diff --git a/changelog.txt b/changelog.txt index 725f9e9..30dfbc6 100755 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,30 @@ *** WooCommerce Subscriptions Changelog *** +2019.05.30 - version 2.5.6 +* Fix: Exclude core order properties from the meta copied from the subscription to early renewal orders. #PR3331 +* Tweak: Add the 'is-active' class to My Account > My Subscription menu item when user is on View Subscription page. PR#3328 + +2019.05.13 - version 2.5.5 +* New: Add support for admin users to re-display the staging site notice if it was previously hidden. PR#3321 +* Fix: Revert a fix released in 2.5.4 which attempted to implement a workaround for SiteGround's staging sites. PR#3323 reverts: PR#3285 + +2019.05.08 - version 2.5.4 +* Fix: Don't save empty product sale date ranges. Fixes an issue where the sale price appears in 1970 after a timezone offset change. PR#3283 +* Fix: Validate subscription coupon types for non subscription and non-signup fee products. Fixes an issue where subscription coupons limited to 1 use never apply to some mixed carts. PR#3280 +* Fix: Fix the PHP warnings that occur on the WP Dashboard page caused by incorrect use of args in a sprintf string. PR#3290 +* Fix: Maintain any cart coupons when emptying the cart because of the store's mixed checkout settings. PR#3291 +* Fix: Fix fatal errors when calling wcs_get_objects_property with a non-object parameter. PR#3308 +* Fix: Use the raw SERVER_ADMIN variable to generate site URL on SiteGround sites. This fixes issues where SiteGround hosted staging sites weren't being recognized as staging sites due to SiteGround's special handling of the site url stored in the DB. PR#3285 +* Fix: Don't check subscription limitation purchasability on admin screens. PR#3311 +* Fix: Pass the 4th param to callbacks on woocommerce_checkout_create_order_shipping_item. PR#3317 +* Fix: Remove order-specific e-mail actions from "Subscription actions" drop-down. PR#3299 +* Fix: Add the item subtotal tax when manually renewing where the prices included tax. Fixes an issue where if the store's tax rates change, customers renewing manually may get a strange item price. PR#3286 +* Tweak: Keep renewal orders "created_via" meta as "subscription" when paid via the checkout. PR#3301 +* Tweak: Remove cancelled PayPal Reference Transactions Billing Agreements from manual, non-PayPal, and ended subscriptions. Fixes an issue where a cancelled subscription is reactivated and attempts to use a cancelled billing agreement. PR#3263 +* Tweak: Increase the WC tested version to 3.6.0. PR#3313 +* Tweak: Update Action Scheduler to 2.2.4. PR#3312 +* New: Add a filter to allow 3rd parties to disable auto-switching. PR#3316 + 2019.03.20 - version 2.5.3 * New: Update Action Scheduler to version 2.2.1. PR#3266 * Fix: Display the subscription status names (rather than the raw status) in the edit subscription related orders table. PR#3272 diff --git a/includes/admin/class-wc-subscriptions-admin.php b/includes/admin/class-wc-subscriptions-admin.php index 5449821..0060855 100755 --- a/includes/admin/class-wc-subscriptions-admin.php +++ b/includes/admin/class-wc-subscriptions-admin.php @@ -467,8 +467,8 @@ class WC_Subscriptions_Admin { $site_offset = get_option( 'gmt_offset' ) * 3600; // Save the timestamps in UTC time, the way WC does it. - $date_from = ( isset( $_POST['_sale_price_dates_from'] ) ) ? wcs_date_to_time( $_POST['_sale_price_dates_from'] ) - $site_offset : ''; - $date_to = ( isset( $_POST['_sale_price_dates_to'] ) ) ? wcs_date_to_time( $_POST['_sale_price_dates_to'] ) - $site_offset : ''; + $date_from = ( ! empty( $_POST['_sale_price_dates_from'] ) ) ? wcs_date_to_time( $_POST['_sale_price_dates_from'] ) - $site_offset : ''; + $date_to = ( ! empty( $_POST['_sale_price_dates_to'] ) ) ? wcs_date_to_time( $_POST['_sale_price_dates_to'] ) - $site_offset : ''; $now = gmdate( 'U' ); diff --git a/includes/admin/class-wcs-admin-meta-boxes.php b/includes/admin/class-wcs-admin-meta-boxes.php index 12b4d61..b21035b 100755 --- a/includes/admin/class-wcs-admin-meta-boxes.php +++ b/includes/admin/class-wcs-admin-meta-boxes.php @@ -43,7 +43,9 @@ class WCS_Admin_Meta_Boxes { add_action( 'woocommerce_order_action_wcs_create_pending_renewal', __CLASS__ . '::create_pending_renewal_action_request', 10, 1 ); add_action( 'woocommerce_order_action_wcs_create_pending_parent', __CLASS__ . '::create_pending_parent_action_request', 10, 1 ); - add_filter( 'woocommerce_resend_order_emails_available', __CLASS__ . '::remove_order_email_actions', 0, 1 ); + if ( WC_Subscriptions::is_woocommerce_pre( '3.2' ) ) { + add_filter( 'woocommerce_resend_order_emails_available', __CLASS__ . '::remove_order_email_actions', 0, 1 ); + } add_action( 'woocommerce_order_action_wcs_retry_renewal_payment', __CLASS__ . '::process_retry_renewal_payment_action_request', 10, 1 ); } @@ -147,16 +149,21 @@ class WCS_Admin_Meta_Boxes { public static function add_subscription_actions( $actions ) { global $theorder; - if ( wcs_is_subscription( $theorder ) && ! $theorder->has_status( wcs_get_subscription_ended_statuses() ) ) { - - if ( $theorder->payment_method_supports( 'subscription_date_changes' ) && $theorder->has_status( 'active' ) ) { - $actions['wcs_process_renewal'] = esc_html__( 'Process renewal', 'woocommerce-subscriptions' ); + if ( wcs_is_subscription( $theorder ) ) { + if ( ! WC_Subscriptions::is_woocommerce_pre( '3.2' ) ) { + unset( $actions['send_order_details'], $actions['send_order_details_admin'] ); } - if ( count( $theorder->get_related_orders() ) > 0 ) { - $actions['wcs_create_pending_renewal'] = esc_html__( 'Create pending renewal order', 'woocommerce-subscriptions' ); - } else { - $actions['wcs_create_pending_parent'] = esc_html__( 'Create pending parent order', 'woocommerce-subscriptions' ); + if ( ! $theorder->has_status( wcs_get_subscription_ended_statuses() ) ) { + if ( $theorder->payment_method_supports( 'subscription_date_changes' ) && $theorder->has_status( 'active' ) ) { + $actions['wcs_process_renewal'] = esc_html__( 'Process renewal', 'woocommerce-subscriptions' ); + } + + if ( count( $theorder->get_related_orders() ) > 0 ) { + $actions['wcs_create_pending_renewal'] = esc_html__( 'Create pending renewal order', 'woocommerce-subscriptions' ); + } else { + $actions['wcs_create_pending_parent'] = esc_html__( 'Create pending parent order', 'woocommerce-subscriptions' ); + } } } else if ( self::can_renewal_order_be_retried( $theorder ) ) { $actions['wcs_retry_renewal_payment'] = esc_html__( 'Retry Renewal Payment', 'woocommerce-subscriptions' ); diff --git a/includes/admin/reports/class-wcs-report-dashboard.php b/includes/admin/reports/class-wcs-report-dashboard.php index 6e14f3e..1882983 100755 --- a/includes/admin/reports/class-wcs-report-dashboard.php +++ b/includes/admin/reports/class-wcs-report-dashboard.php @@ -209,7 +209,7 @@ class WCS_Report_Dashboard { signup_count, 'woocommerce-subscriptions' ), $report_data->signup_count, '', '' ) ); + echo wp_kses_post( sprintf( _n( '%2$s%1$s signup%3$s subscription signups this month', '%2$s%1$s signups%3$s subscription signups this month', $report_data->signup_count, 'woocommerce-subscriptions' ), $report_data->signup_count, '', '' ) ); ?> diff --git a/includes/class-wc-subscriptions-checkout.php b/includes/class-wc-subscriptions-checkout.php index 79ea7f4..1e0bd94 100755 --- a/includes/class-wc-subscriptions-checkout.php +++ b/includes/class-wc-subscriptions-checkout.php @@ -301,8 +301,8 @@ class WC_Subscriptions_Checkout { $item->save(); // We need the item ID for old hooks, this can be removed once support for WC < 3.0 is dropped wc_do_deprecated_action( 'woocommerce_subscriptions_add_recurring_shipping_order_item', array( $subscription->get_id(), $item->get_id(), $package_key ), '2.2.0', 'CRUD and woocommerce_checkout_create_subscription_shipping_item action instead' ); - do_action( 'woocommerce_checkout_create_order_shipping_item', $item, $package_key, $package ); // WC 3.0+ will also trigger the deprecated 'woocommerce_add_shipping_order_item' hook - do_action( 'woocommerce_checkout_create_subscription_shipping_item', $item, $package_key, $package ); + do_action( 'woocommerce_checkout_create_order_shipping_item', $item, $package_key, $package, $subscription ); // WC 3.0+ will also trigger the deprecated 'woocommerce_add_shipping_order_item' hook + do_action( 'woocommerce_checkout_create_subscription_shipping_item', $item, $package_key, $package, $subscription ); } } } diff --git a/includes/class-wc-subscriptions-coupon.php b/includes/class-wc-subscriptions-coupon.php index c7add64..6d44da5 100755 --- a/includes/class-wc-subscriptions-coupon.php +++ b/includes/class-wc-subscriptions-coupon.php @@ -40,6 +40,16 @@ class WC_Subscriptions_Coupon { 'recurring_percent' => 1, ); + /** + * Subscription sign up fee coupon types. + * + * @var array + */ + private static $sign_up_fee_coupons = array( + 'sign_up_fee_percent' => 1, + 'sign_up_fee' => 1, + ); + /** * Virtual renewal coupon types. * @@ -84,6 +94,8 @@ class WC_Subscriptions_Coupon { // Hook recurring coupon functionality. add_action( 'plugins_loaded', array( __CLASS__, 'maybe_add_recurring_coupon_hooks' ) ); + + add_filter( 'woocommerce_coupon_is_valid_for_product', array( __CLASS__, 'validate_subscription_coupon_for_product' ), 10, 3 ); } /** @@ -1196,6 +1208,41 @@ class WC_Subscriptions_Coupon { return $price; } + /** + * Validates a subscription coupon's use for a given product. + * + * @since 2.5.4 + * + * @param bool $is_valid Whether the coupon is valid for the product. + * @param WC_Product $product The product object. + * @param WC_Coupon $coupon The coupon object. + * + * @return bool Whether the coupon is valid for the product. + */ + public static function validate_subscription_coupon_for_product( $is_valid, $product, $coupon ) { + + // Exit early if the coupon is already invalid. + if ( ! $is_valid ) { + return $is_valid; + } + + $coupon_type = $coupon->get_discount_type(); + $is_recurring_coupon = isset( self::$recurring_coupons[ $coupon_type ] ); + $is_sign_up_fee_coupon = isset( self::$sign_up_fee_coupons[ $coupon_type ] ); + + // Recurring and sign up fee coupons are not valid for non-subscription products. + if ( ( $is_recurring_coupon || $is_sign_up_fee_coupon ) && ! WC_Subscriptions_Product::is_subscription( $product ) ) { + $is_valid = false; + } + + // Sign up fee coupons are not valid for products without a sign up fee. + if ( $is_sign_up_fee_coupon && 0 === WC_Subscriptions_Product::get_sign_up_fee( $product ) ) { + $is_valid = false; + } + + return $is_valid; + } + /** * Store how much discount each coupon grants. * diff --git a/includes/class-wc-subscriptions-switcher.php b/includes/class-wc-subscriptions-switcher.php index 50d416c..17e29d9 100755 --- a/includes/class-wc-subscriptions-switcher.php +++ b/includes/class-wc-subscriptions-switcher.php @@ -260,7 +260,7 @@ class WC_Subscriptions_Switcher { } } - if ( self::can_item_be_switched_by_user( $item, $subscription ) ) { + if ( apply_filters( 'wcs_initiate_auto_switch', self::can_item_be_switched_by_user( $item, $subscription ), $item, $subscription ) ) { wp_redirect( add_query_arg( 'auto-switch', 'true', self::get_switch_url( $item_id, $item, $subscription ) ) ); exit; } diff --git a/includes/class-wcs-cart-renewal.php b/includes/class-wcs-cart-renewal.php index 64a1d35..e06240c 100755 --- a/includes/class-wcs-cart-renewal.php +++ b/includes/class-wcs-cart-renewal.php @@ -63,6 +63,9 @@ class WCS_Cart_Renewal { // Apply renewal discounts as pseudo coupons add_action( 'woocommerce_setup_cart_for_subscription_renewal', array( $this, 'setup_discounts' ) ); + + // Work around WC changing the "created_via" meta to "checkout" regardless of its previous value during checkout. + add_action( 'woocommerce_checkout_create_order', array( $this, 'maybe_preserve_order_created_via' ), 0, 1 ); } /** @@ -403,16 +406,8 @@ class WCS_Cart_Renewal { $price = $item_to_renew['line_subtotal']; - if ( $_product->is_taxable() && wc_prices_include_tax() ) { - - if ( apply_filters( 'woocommerce_adjust_non_base_location_prices', true ) ) { - $base_tax_rates = WC_Tax::get_base_tax_rates( wcs_get_objects_property( $_product, 'tax_class' ) ); - } else { - $base_tax_rates = WC_Tax::get_rates( wcs_get_objects_property( $_product, 'tax_class' ) ); - } - - $base_taxes_on_item = WC_Tax::calc_tax( $price, $base_tax_rates, false, false ); - $price += array_sum( $base_taxes_on_item ); + if ( $_product->is_taxable() && $subscription->get_prices_include_tax() ) { + $price += $item_to_renew['subtotal_tax']; } $_product->set_price( $price / $item_to_renew['qty'] ); @@ -1383,6 +1378,21 @@ class WCS_Cart_Renewal { } } + /** + * Makes sure a renewal order's "created via" meta is not changed to "checkout" by WC during checkout. + * + * @param WC_Order $order + * @since 2.5.4 + */ + public function maybe_preserve_order_created_via( $order ) { + $changes = $order->get_changes(); + $current_data = $order->get_data(); + + if ( isset( $changes['created_via'], $current_data['created_via'] ) && 'subscription' === $current_data['created_via'] && 'checkout' === $changes['created_via'] && wcs_order_contains_renewal( $order ) ) { + $order->set_created_via( 'subscription' ); + } + } + /* Deprecated */ /** diff --git a/includes/class-wcs-limiter.php b/includes/class-wcs-limiter.php index e88ddf6..b6dbdea 100755 --- a/includes/class-wcs-limiter.php +++ b/includes/class-wcs-limiter.php @@ -16,17 +16,16 @@ class WCS_Limiter { public static function init() { - //Add limiting subscriptions options on edit product page + // Add limiting subscriptions options on edit product page add_action( 'woocommerce_product_options_advanced', __CLASS__ . '::admin_edit_product_fields' ); - add_filter( 'woocommerce_subscription_is_purchasable', __CLASS__ . '::is_purchasable_switch', 12, 2 ); - - add_filter( 'woocommerce_subscription_variation_is_purchasable', __CLASS__ . '::is_purchasable_switch', 12, 2 ); - - add_filter( 'woocommerce_subscription_is_purchasable', __CLASS__ . '::is_purchasable_renewal', 12, 2 ); - - add_filter( 'woocommerce_subscription_variation_is_purchasable', __CLASS__ . '::is_purchasable_renewal', 12, 2 ); - + // Only attach limited subscription purchasability logic on the front end. + if ( ! is_admin() ) { + add_filter( 'woocommerce_subscription_is_purchasable', __CLASS__ . '::is_purchasable_switch', 12, 2 ); + add_filter( 'woocommerce_subscription_variation_is_purchasable', __CLASS__ . '::is_purchasable_switch', 12, 2 ); + add_filter( 'woocommerce_subscription_is_purchasable', __CLASS__ . '::is_purchasable_renewal', 12, 2 ); + add_filter( 'woocommerce_subscription_variation_is_purchasable', __CLASS__ . '::is_purchasable_renewal', 12, 2 ); + } } /** @@ -215,7 +214,7 @@ class WCS_Limiter { $is_purchasable = true; // Restoring cart from session, so need to check the cart in the session (wcs_cart_contains_renewal() only checks the cart) - } elseif ( WC()->session->cart ) { + } elseif ( ! empty( WC()->session->cart ) ) { foreach ( WC()->session->cart as $cart_item_key => $cart_item ) { if ( $product->get_id() == $cart_item['product_id'] && ( isset( $cart_item['subscription_renewal'] ) || isset( $cart_item['subscription_resubscribe'] ) ) ) { $is_purchasable = true; diff --git a/includes/class-wcs-query.php b/includes/class-wcs-query.php index 7f49076..1e5976c 100755 --- a/includes/class-wcs-query.php +++ b/includes/class-wcs-query.php @@ -31,6 +31,7 @@ class WCS_Query extends WC_Query { add_filter( 'woocommerce_get_endpoint_url', array( $this, 'maybe_redirect_to_only_subscription' ), 10, 2 ); add_action( 'woocommerce_account_subscriptions_endpoint', array( $this, 'endpoint_content' ) ); + add_filter( 'woocommerce_account_menu_item_classes', array( $this, 'maybe_add_active_class' ), 10, 2 ); } $this->init_query_vars(); @@ -136,7 +137,7 @@ class WCS_Query extends WC_Query { return $menu_items; } - if ( 1 == count( wcs_get_users_subscriptions() ) && apply_filters( 'wcs_my_account_redirect_to_single_subscription', true ) ) { + if ( 1 === count( wcs_get_users_subscriptions() ) && apply_filters( 'wcs_my_account_redirect_to_single_subscription', true ) ) { $label = __( 'My Subscription', 'woocommerce-subscriptions' ); } else { $label = __( 'Subscriptions', 'woocommerce-subscriptions' ); @@ -356,4 +357,21 @@ class WCS_Query extends WC_Query { public function add_wcs_query_vars( $query_vars ) { return array_merge( $query_vars, $this->query_vars ); } + + /** + * Adds `is-active` class to Subscriptions label when we're viewing a single Subscription. + * + * @param array $classes The classes present in the current endpoint. + * @param string $endpoint The endpoint/label we're filtering. + * + * @return array + * @since 2.5.6 + */ + public function maybe_add_active_class( $classes, $endpoint ) { + if ( ! isset( $classes['is-active'] ) && 'subscriptions' === $endpoint && wcs_is_view_subscription_page() ) { + $classes[] = 'is-active'; + } + + return $classes; + } } diff --git a/includes/class-wcs-staging.php b/includes/class-wcs-staging.php index da28dd9..eab8f07 100755 --- a/includes/class-wcs-staging.php +++ b/includes/class-wcs-staging.php @@ -14,6 +14,7 @@ class WCS_Staging { public static function init() { add_action( 'woocommerce_generated_manual_renewal_order', array( __CLASS__, 'maybe_record_staging_site_renewal' ) ); add_filter( 'woocommerce_register_post_type_subscription', array( __CLASS__, 'maybe_add_menu_badge' ) ); + add_action( 'wp_loaded', array( __CLASS__, 'maybe_reset_admin_notice' ) ); } /** @@ -54,4 +55,16 @@ class WCS_Staging { return $subscription_order_type_data; } + + /** + * Handles admin requests to redisplay the staging site admin notice. + * + * @since 2.5.5 + */ + public static function maybe_reset_admin_notice() { + if ( isset( $_REQUEST['wcs_display_staging_notice'] ) && is_admin() && current_user_can( 'manage_options' ) ) { + delete_option( 'wcs_ignore_duplicate_siteurl_notice' ); + wp_safe_redirect( remove_query_arg( array( 'wcs_display_staging_notice' ) ) ); + } + } } diff --git a/includes/early-renewal/class-wcs-cart-early-renewal.php b/includes/early-renewal/class-wcs-cart-early-renewal.php index 8ca8607..446939a 100755 --- a/includes/early-renewal/class-wcs-cart-early-renewal.php +++ b/includes/early-renewal/class-wcs-cart-early-renewal.php @@ -158,16 +158,17 @@ class WCS_Cart_Early_Renewal extends WCS_Cart_Renewal { * @since 2.5.2 */ public function copy_subscription_meta_to_order( $order ) { - $cart_item = $this->cart_contains(); - if ( ! $cart_item ) { - return; + if ( $this->cart_contains() ) { + // Get the subscription. + $subscription = $this->get_order(); + + if ( $subscription ) { + // Copy all meta, excluding core properties (totals etc), from the subscription to new renewal order + add_filter( 'wcs_renewal_order_meta', array( $this, 'exclude_core_order_meta_properties' ) ); + wcs_copy_order_meta( $subscription, $order, 'renewal_order' ); + remove_filter( 'wcs_renewal_order_meta', array( $this, 'exclude_core_order_meta_properties' ) ); + } } - - // Get the subscription. - $subscription = wcs_get_subscription( $cart_item[ $this->cart_item_key ]['subscription_id'] ); - - // Copy all meta from subscription to new renewal order - wcs_copy_order_meta( $subscription, $order, 'renewal_order' ); } /** @@ -415,4 +416,65 @@ class WCS_Cart_Early_Renewal extends WCS_Cart_Renewal { } } } + + /** + * Excludes core order meta properties from the meta copied from the subscription. + * + * Attached to the dynamic hook 'wcs_renewal_order_meta' which is triggered by wcs_copy_order_meta + * when copying meta from the subscription to the early renewal order. + * + * @since 2.5.6 + * + * @param array $order_meta The meta keys and values to copy from the subscription to the early renewal order. + * @return array The subscription meta to copy to the early renewal order. + */ + public function exclude_core_order_meta_properties( $order_meta ) { + + // Additional meta keys to exclude. These are in addition to the meta keys already excluded by wcs_copy_order_meta(). + $excluded_meta_keys = array( + '_customer_user' => 1, + '_order_currency' => 1, + '_prices_include_tax' => 1, + '_order_version' => 1, + '_shipping_first_name' => 1, + '_shipping_last_name' => 1, + '_shipping_company' => 1, + '_shipping_address_1' => 1, + '_shipping_address_2' => 1, + '_shipping_city' => 1, + '_shipping_state' => 1, + '_shipping_postcode' => 1, + '_shipping_country' => 1, + '_shipping_address_index' => 1, + '_billing_first_name' => 1, + '_billing_last_name' => 1, + '_billing_company' => 1, + '_billing_address_1' => 1, + '_billing_address_2' => 1, + '_billing_city' => 1, + '_billing_state' => 1, + '_billing_postcode' => 1, + '_billing_country' => 1, + '_billing_email' => 1, + '_billing_phone' => 1, + '_billing_address_index' => 1, + 'is_vat_exempt' => 1, + '_customer_ip_address' => 1, + '_customer_user_agent' => 1, + '_cart_discount' => 1, + '_cart_discount_tax' => 1, + '_order_shipping' => 1, + '_order_shipping_tax' => 1, + '_order_tax' => 1, + '_order_total' => 1, + ); + + foreach ( $order_meta as $index => $meta ) { + if ( isset( $excluded_meta_keys[ $meta['meta_key'] ] ) ) { + unset( $order_meta[ $index ] ); + } + } + + return $order_meta; + } } diff --git a/includes/gateways/class-wc-subscriptions-payment-gateways.php b/includes/gateways/class-wc-subscriptions-payment-gateways.php index 88ea101..d11849c 100755 --- a/includes/gateways/class-wc-subscriptions-payment-gateways.php +++ b/includes/gateways/class-wc-subscriptions-payment-gateways.php @@ -174,18 +174,16 @@ class WC_Subscriptions_Payment_Gateways { /** * Fire a gateway specific hook for when a subscription renewal payment is due. * + * @param WC_Order $renewal_order The renewal order to trigger the payment gateway hook for. * @since 2.1.0 */ public static function trigger_gateway_renewal_payment_hook( $renewal_order ) { - - $renewal_order_payment_method = wcs_get_objects_property( $renewal_order, 'payment_method' ); - - if ( ! empty( $renewal_order ) && $renewal_order->get_total() > 0 && ! empty( $renewal_order_payment_method ) ) { + if ( ! empty( $renewal_order ) && $renewal_order->get_total() > 0 && $renewal_order->get_payment_method() ) { // Make sure gateways are setup WC()->payment_gateways(); - do_action( 'woocommerce_scheduled_subscription_payment_' . $renewal_order_payment_method, $renewal_order->get_total(), $renewal_order ); + do_action( 'woocommerce_scheduled_subscription_payment_' . $renewal_order->get_payment_method(), $renewal_order->get_total(), $renewal_order ); } } diff --git a/includes/gateways/paypal/class-wcs-paypal.php b/includes/gateways/paypal/class-wcs-paypal.php index 0c42dbf..bfb5d44 100755 --- a/includes/gateways/paypal/class-wcs-paypal.php +++ b/includes/gateways/paypal/class-wcs-paypal.php @@ -30,6 +30,13 @@ class WCS_PayPal { /** @var Array cache of PayPal Standard settings in WooCommerce */ protected static $paypal_settings; + /** + * An internal cache of subscription IDs with a specific PayPal Standard Profile ID or Reference Transaction Billing Agreement. + * + * @var int[][] + */ + protected static $subscriptions_by_paypal_id = array(); + /** * Main PayPal Instance, ensures only one instance is/can be loaded * @@ -688,4 +695,41 @@ class WCS_PayPal { return $available_gateways; } + + /** + * Gets subscriptions with a given paypal subscription id. + * + * @since 2.5.4 + * @param string $paypal_id The PayPal Standard Profile ID or PayPal Reference Transactions Billing Agreement. + * @param string $return Optional. The type to return. Can be 'ids' to return subscription IDs or 'objects' to return WC_Subscription objects. Default 'ids'. + * @return WC_Subscription[]|int[] Subscriptions (objects or IDs) with the PayPal Profile ID or Billing Agreement stored in meta. + */ + public static function get_subscriptions_by_paypal_id( $paypal_id, $return = 'ids' ) { + + if ( ! isset( self::$subscriptions_by_paypal_id[ $paypal_id ] ) ) { + $subscription_ids = get_posts( array( + 'posts_per_page' => -1, + 'post_type' => 'shop_subscription', + 'post_status' => 'any', + 'fields' => 'ids', + 'meta_query' => array( + array( + 'key' => '_paypal_subscription_id', + 'compare' => '=', + 'value' => $paypal_id, + ), + ), + ) ); + + self::$subscriptions_by_paypal_id[ $paypal_id ] = array_combine( $subscription_ids, $subscription_ids ); + } + + if ( 'objects' === $return ) { + $subscriptions = array_filter( array_map( 'wcs_get_subscription', self::$subscriptions_by_paypal_id[ $paypal_id ] ) ); + } else { + $subscriptions = self::$subscriptions_by_paypal_id[ $paypal_id ]; + } + + return $subscriptions; + } } diff --git a/includes/gateways/paypal/includes/admin/class-wcs-paypal-admin.php b/includes/gateways/paypal/includes/admin/class-wcs-paypal-admin.php index 1376f30..8819b4c 100755 --- a/includes/gateways/paypal/includes/admin/class-wcs-paypal-admin.php +++ b/includes/gateways/paypal/includes/admin/class-wcs-paypal-admin.php @@ -248,35 +248,39 @@ class WCS_PayPal_Admin { * @param WC_Subscription $subscription */ public static function profile_link( $subscription ) { - if ( wcs_is_subscription( $subscription ) && ! $subscription->is_manual() && 'paypal' == $subscription->get_payment_method() ) { - - $paypal_profile_id = wcs_get_paypal_id( $subscription ); - - if ( ! empty( $paypal_profile_id ) ) { - - $url = ''; - - if ( false === wcs_is_paypal_profile_a( $paypal_profile_id, 'billing_agreement' ) ) { - // Standard subscription - $url = 'https://www.paypal.com/?cmd=_profile-recurring-payments&encrypted_profile_id=' . $paypal_profile_id; - } else if ( wcs_is_paypal_profile_a( $paypal_profile_id, 'billing_agreement' ) ) { - // Reference Transaction subscription - $url = 'https://www.paypal.com/?cmd=_profile-merchant-pull&encrypted_profile_id=' . $paypal_profile_id . '&mp_id=' . $paypal_profile_id . '&return_to=merchant&flag_flow=merchant'; - } - - echo '
'; - echo '

'; - echo esc_html( __( 'PayPal Subscription ID:', 'woocommerce-subscriptions' ) ); - echo ''; - if ( ! empty( $url ) ) { - echo '' . esc_html( $paypal_profile_id ) . ''; - } else { - echo esc_html( $paypal_profile_id ); - } - echo '

'; - } + if ( ! wcs_is_subscription( $subscription ) || $subscription->is_manual() || 'paypal' != $subscription->get_payment_method() ) { + return; } + $paypal_profile_id = wcs_get_paypal_id( $subscription ); + + if ( empty( $paypal_profile_id ) ) { + return; + } + + $url = ''; + $domain = WCS_PayPal::get_option( 'testmode' ) === 'yes' ? 'sandbox.paypal' : 'paypal'; + + if ( false === wcs_is_paypal_profile_a( $paypal_profile_id, 'billing_agreement' ) ) { + // Standard subscription + $url = "https://www.{$domain}.com/?cmd=_profile-recurring-payments&encrypted_profile_id={$paypal_profile_id}"; + } elseif ( wcs_is_paypal_profile_a( $paypal_profile_id, 'billing_agreement' ) ) { + // Reference Transaction subscription + $url = "https://www.{$domain}.com/?cmd=_profile-merchant-pull&encrypted_profile_id={$paypal_profile_id}&mp_id={$paypal_profile_id}&return_to=merchant&flag_flow=merchant"; + } + + echo '
'; + echo '

'; + echo esc_html( __( 'PayPal Subscription ID:', 'woocommerce-subscriptions' ) ); + echo ''; + + if ( ! empty( $url ) ) { + echo '' . esc_html( $paypal_profile_id ) . ''; + } else { + echo esc_html( $paypal_profile_id ); + } + + echo '

'; } /** diff --git a/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-ipn-handler.php b/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-ipn-handler.php index 1d5f9f7..80ed3a2 100755 --- a/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-ipn-handler.php +++ b/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-ipn-handler.php @@ -51,6 +51,7 @@ class WCS_PayPal_Reference_Transaction_IPN_Handler extends WCS_PayPal_Standard_I case 'mp_cancel': $this->cancel_subscriptions( $transaction_details['mp_id'] ); + $this->remove_billing_agreement_from_subscriptions( $transaction_details['mp_id'] ); break; case 'merch_pmt' : @@ -84,50 +85,44 @@ class WCS_PayPal_Reference_Transaction_IPN_Handler extends WCS_PayPal_Standard_I } /** - * Find all subscription with a given billing agreement ID and cancel them becasue that billing agreement has been + * Find all subscription with a given billing agreement ID and cancel them because that billing agreement has been * cancelled at PayPal, and therefore, no future payments can be charged. * * @since 2.0 */ protected function cancel_subscriptions( $billing_agreement_id ) { - - $subscription_ids = get_posts( array( - 'posts_per_page' => -1, - 'post_type' => 'shop_subscription', - 'post_status' => 'any', - 'fields' => 'ids', - 'orderby' => 'date', - 'order' => 'DESC', - 'meta_query' => array( - array( - 'key' => '_paypal_subscription_id', - 'compare' => '=', - 'value' => $billing_agreement_id, - ), - ), - ) ); - - if ( empty( $subscription_ids ) ) { - return; - } - $note = esc_html__( 'Billing agreement cancelled at PayPal.', 'woocommerce-subscriptions' ); - foreach ( $subscription_ids as $subscription_id ) { + foreach ( WCS_PayPal::get_subscriptions_by_paypal_id( $billing_agreement_id, 'objects' ) as $subscription ) { + $is_paypal_subscription = ! $subscription->is_manual() && 'paypal' === $subscription->get_payment_method(); - $subscription = wcs_get_subscription( $subscription_id ); - - // Only cancel valid subscriptions using PayPal as the payment method that have not yet been ended - if ( false == $subscription || $subscription->is_manual() || 'paypal' != $subscription->get_payment_method() || $subscription->has_status( wcs_get_subscription_ended_statuses() ) ) { - continue; - } - - try { - $subscription->cancel_order( $note ); - WC_Gateway_Paypal::log( sprintf( 'Subscription %s Cancelled: %s', $subscription_id, $note ) ); - } catch ( Exception $e ) { - WC_Gateway_Paypal::log( sprintf( 'Unable to cancel subscription %s: %s', $subscription_id, $e->getMessage() ) ); + // Cancel PayPal subscriptions which haven't ended yet. + if ( $is_paypal_subscription && ! $subscription->has_status( wcs_get_subscription_ended_statuses() ) ) { + try { + $subscription->cancel_order( $note ); + WC_Gateway_Paypal::log( sprintf( 'Subscription %s Cancelled: %s', $subscription->get_id(), $note ) ); + } catch ( Exception $e ) { + WC_Gateway_Paypal::log( sprintf( 'Unable to cancel subscription %s: %s', $subscription->get_id(), $e->getMessage() ) ); + } } } } + + /** + * Removes a billing agreement from all subscriptions. + * + * @since 2.5.4 + * @param string $billing_agreement_id The billing agreement to remove. + */ + protected function remove_billing_agreement_from_subscriptions( $billing_agreement_id ) { + foreach ( WCS_PayPal::get_subscriptions_by_paypal_id( $billing_agreement_id, 'objects' ) as $subscription ) { + if ( 'paypal' === $subscription->get_payment_method() ) { + $subscription->set_payment_method(); + } + + $subscription->delete_meta_data( '_paypal_subscription_id' ); + $subscription->update_meta_data( '_cancelled_paypal_billing_agreement', $billing_agreement_id ); + $subscription->save(); + } + } } diff --git a/includes/libraries/action-scheduler/action-scheduler.php b/includes/libraries/action-scheduler/action-scheduler.php index ce8fee4..8c3117d 100755 --- a/includes/libraries/action-scheduler/action-scheduler.php +++ b/includes/libraries/action-scheduler/action-scheduler.php @@ -1,14 +1,14 @@ register( '2.2.1', 'action_scheduler_initialize_2_dot_2_dot_1' ); + $versions->register( '2.2.4', 'action_scheduler_initialize_2_dot_2_dot_4' ); } - function action_scheduler_initialize_2_dot_2_dot_1() { + function action_scheduler_initialize_2_dot_2_dot_4() { require_once( 'classes/ActionScheduler.php' ); ActionScheduler::init( __FILE__ ); } diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_AdminView.php b/includes/libraries/action-scheduler/classes/ActionScheduler_AdminView.php index 91d8b18..d87861e 100755 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_AdminView.php +++ b/includes/libraries/action-scheduler/classes/ActionScheduler_AdminView.php @@ -40,7 +40,7 @@ class ActionScheduler_AdminView extends ActionScheduler_AdminView_Deprecated { public function system_status_report() { $table = new ActionScheduler_wcSystemStatus( ActionScheduler::store() ); - $table->print(); + $table->render(); } /** diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_WPCLI_QueueRunner.php b/includes/libraries/action-scheduler/classes/ActionScheduler_WPCLI_QueueRunner.php index f58b718..c5689b5 100755 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_WPCLI_QueueRunner.php +++ b/includes/libraries/action-scheduler/classes/ActionScheduler_WPCLI_QueueRunner.php @@ -112,11 +112,7 @@ class ActionScheduler_WPCLI_QueueRunner extends ActionScheduler_Abstract_QueueRu $this->process_action( $action_id ); $this->progress_bar->tick(); - - // Free up memory after every 50 items - if ( 0 === $this->progress_bar->current() % 50 ) { - $this->stop_the_insanity(); - } + $this->maybe_stop_the_insanity(); } $completed = $this->progress_bar->current(); @@ -207,4 +203,15 @@ class ActionScheduler_WPCLI_QueueRunner extends ActionScheduler_Abstract_QueueRu call_user_func( array( $wp_object_cache, '__remoteset' ) ); // important } } + + /** + * Maybe trigger the stop_the_insanity() method to free up memory. + */ + protected function maybe_stop_the_insanity() { + // The value returned by progress_bar->current() might be padded. Remove padding, and convert to int. + $current_iteration = intval( trim( $this->progress_bar->current() ) ); + if ( 0 === $current_iteration % 50 ) { + $this->stop_the_insanity(); + } + } } diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_wcSystemStatus.php b/includes/libraries/action-scheduler/classes/ActionScheduler_wcSystemStatus.php index ec7f5a4..3213d7c 100755 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_wcSystemStatus.php +++ b/includes/libraries/action-scheduler/classes/ActionScheduler_wcSystemStatus.php @@ -21,7 +21,7 @@ class ActionScheduler_wcSystemStatus { * * Helpful to identify issues, like a clogged queue. */ - public function print() { + public function render() { $action_counts = $this->store->action_counts(); $status_labels = $this->store->get_status_labels(); $oldest_and_newest = $this->get_oldest_and_newest( array_keys( $status_labels ) ); @@ -126,4 +126,22 @@ class ActionScheduler_wcSystemStatus { post_title; $args = json_decode( $post->post_content, true ); - - // Handle args that do not decode properly. - if ( JSON_ERROR_NONE !== json_last_error() || ! is_array( $args ) ) { - throw ActionScheduler_InvalidActionException::from_decoding_args( $post->ID ); - } + $this->validate_args( $args, $post->ID ); $schedule = get_post_meta( $post->ID, self::SCHEDULE_META_KEY, true ); if ( empty( $schedule ) || ! is_a( $schedule, 'ActionScheduler_Schedule' ) ) { @@ -788,4 +784,24 @@ class ActionScheduler_wpPostStore extends ActionScheduler_Store { $taxonomy_registrar = new ActionScheduler_wpPostStore_TaxonomyRegistrar(); $taxonomy_registrar->register(); } + + /** + * Validate that we could decode action arguments. + * + * @param mixed $args The decoded arguments. + * @param int $action_id The action ID. + * + * @throws ActionScheduler_InvalidActionException When the decoded arguments are invalid. + */ + private function validate_args( $args, $action_id ) { + // Ensure we have an array of args. + if ( ! is_array( $args ) ) { + throw ActionScheduler_InvalidActionException::from_decoding_args( $action_id ); + } + + // Validate JSON decoding if possible. + if ( function_exists( 'json_last_error' ) && JSON_ERROR_NONE !== json_last_error() ) { + throw ActionScheduler_InvalidActionException::from_decoding_args( $action_id ); + } + } } diff --git a/includes/libraries/action-scheduler/composer.json b/includes/libraries/action-scheduler/composer.json index 4df2c2d..a3b2c4a 100755 --- a/includes/libraries/action-scheduler/composer.json +++ b/includes/libraries/action-scheduler/composer.json @@ -6,6 +6,6 @@ "minimum-stability": "dev", "require": {}, "require-dev": { - "wp-cli/wp-cli": "^1.3" + "wp-cli/wp-cli": "1.5.1" } } diff --git a/includes/libraries/action-scheduler/composer.lock b/includes/libraries/action-scheduler/composer.lock deleted file mode 100755 index de44d81..0000000 --- a/includes/libraries/action-scheduler/composer.lock +++ /dev/null @@ -1,2909 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "f4556531e7b95173d1b769b3d7350926", - "packages": [], - "packages-dev": [ - { - "name": "composer/ca-bundle", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", - "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5", - "psr/log": "^1.0", - "symfony/process": "^2.5 || ^3.0" - }, - "suggest": { - "symfony/process": "This is necessary to reliably check whether openssl_x509_parse is vulnerable on older php versions, but can be ignored on PHP 5.5.6+" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\CaBundle\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", - "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" - ], - "time": "2017-03-06T11:59:08+00:00" - }, - { - "name": "composer/composer", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/composer/composer.git", - "reference": "82c27a68bc5cb76f3d00b82c27496e3cdbb6d4ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/82c27a68bc5cb76f3d00b82c27496e3cdbb6d4ff", - "reference": "82c27a68bc5cb76f3d00b82c27496e3cdbb6d4ff", - "shasum": "" - }, - "require": { - "composer/ca-bundle": "^1.0", - "composer/semver": "^1.0", - "composer/spdx-licenses": "^1.0", - "justinrainbow/json-schema": "^3.0 || ^4.0 || ^5.0", - "php": "^5.3.2 || ^7.0", - "psr/log": "^1.0", - "seld/cli-prompt": "^1.0", - "seld/jsonlint": "^1.4", - "seld/phar-utils": "^1.0", - "symfony/console": "^2.7 || ^3.0", - "symfony/filesystem": "^2.7 || ^3.0", - "symfony/finder": "^2.7 || ^3.0", - "symfony/process": "^2.7 || ^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5", - "phpunit/phpunit-mock-objects": "^2.3 || ^3.0" - }, - "suggest": { - "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", - "ext-zip": "Enabling the zip extension allows you to unzip archives", - "ext-zlib": "Allow gzip compression of HTTP requests" - }, - "bin": [ - "bin/composer" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\": "src/Composer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Composer helps you declare, manage and install dependencies of PHP projects, ensuring you have the right stack everywhere.", - "homepage": "https://getcomposer.org/", - "keywords": [ - "autoload", - "dependency", - "package" - ], - "time": "2017-08-09T14:23:46+00:00" - }, - { - "name": "composer/semver", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "7ea669582e6396857cf6d1c0a6cd2728f4e7e383" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/7ea669582e6396857cf6d1c0a6cd2728f4e7e383", - "reference": "7ea669582e6396857cf6d1c0a6cd2728f4e7e383", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5", - "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "time": "2017-05-15T12:49:06+00:00" - }, - { - "name": "composer/spdx-licenses", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/composer/spdx-licenses.git", - "reference": "2603a0d7ddc00a015deb576fa5297ca43dee6b1c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/2603a0d7ddc00a015deb576fa5297ca43dee6b1c", - "reference": "2603a0d7ddc00a015deb576fa5297ca43dee6b1c", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5", - "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Spdx\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "SPDX licenses list and validation library.", - "keywords": [ - "license", - "spdx", - "validator" - ], - "time": "2017-04-03T19:08:52+00:00" - }, - { - "name": "justinrainbow/json-schema", - "version": "5.x-dev", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "36ed4d935f8f5eb958dbd29e1fa5a241ec3ece4d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/36ed4d935f8f5eb958dbd29e1fa5a241ec3ece4d", - "reference": "36ed4d935f8f5eb958dbd29e1fa5a241ec3ece4d", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.1", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.22" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "time": "2017-06-23T11:43:36+00:00" - }, - { - "name": "mustache/mustache", - "version": "v2.12.0", - "source": { - "type": "git", - "url": "https://github.com/bobthecow/mustache.php.git", - "reference": "fe8fe72e9d580591854de404cc59a1b83ca4d19e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/fe8fe72e9d580591854de404cc59a1b83ca4d19e", - "reference": "fe8fe72e9d580591854de404cc59a1b83ca4d19e", - "shasum": "" - }, - "require": { - "php": ">=5.2.4" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~1.11", - "phpunit/phpunit": "~3.7|~4.0|~5.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Mustache": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Justin Hileman", - "email": "justin@justinhileman.info", - "homepage": "http://justinhileman.com" - } - ], - "description": "A Mustache implementation in PHP.", - "homepage": "https://github.com/bobthecow/mustache.php", - "keywords": [ - "mustache", - "templating" - ], - "time": "2017-07-11T12:54:05+00:00" - }, - { - "name": "nb/oxymel", - "version": "v0.1.0", - "source": { - "type": "git", - "url": "https://github.com/nb/oxymel.git", - "reference": "cbe626ef55d5c4cc9b5e6e3904b395861ea76e3c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nb/oxymel/zipball/cbe626ef55d5c4cc9b5e6e3904b395861ea76e3c", - "reference": "cbe626ef55d5c4cc9b5e6e3904b395861ea76e3c", - "shasum": "" - }, - "require": { - "php": ">=5.2.4" - }, - "type": "library", - "autoload": { - "psr-0": { - "Oxymel": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nikolay Bachiyski", - "email": "nb@nikolay.bg", - "homepage": "http://extrapolate.me/" - } - ], - "description": "A sweet XML builder", - "homepage": "https://github.com/nb/oxymel", - "keywords": [ - "xml" - ], - "time": "2013-02-24T15:01:54+00:00" - }, - { - "name": "psr/container", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "2cc4a01788191489dc7459446ba832fa79a216a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/2cc4a01788191489dc7459446ba832fa79a216a7", - "reference": "2cc4a01788191489dc7459446ba832fa79a216a7", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2017-06-28T15:35:32+00:00" - }, - { - "name": "psr/log", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10T12:19:37+00:00" - }, - { - "name": "ramsey/array_column", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/ramsey/array_column.git", - "reference": "f8e52eb28e67eb50e613b451dd916abcf783c1db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ramsey/array_column/zipball/f8e52eb28e67eb50e613b451dd916abcf783c1db", - "reference": "f8e52eb28e67eb50e613b451dd916abcf783c1db", - "shasum": "" - }, - "require-dev": { - "jakub-onderka/php-parallel-lint": "0.8.*", - "phpunit/phpunit": "~4.5", - "satooshi/php-coveralls": "0.6.*", - "squizlabs/php_codesniffer": "~2.2" - }, - "type": "library", - "autoload": { - "files": [ - "src/array_column.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ben Ramsey", - "homepage": "http://benramsey.com" - } - ], - "description": "Provides functionality for array_column() to projects using PHP earlier than version 5.5.", - "homepage": "https://github.com/ramsey/array_column", - "keywords": [ - "array", - "array_column", - "column" - ], - "time": "2015-03-20T22:07:39+00:00" - }, - { - "name": "rmccue/requests", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/rmccue/Requests.git", - "reference": "87932f52ffad70504d93f04f15690cf16a089546" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/rmccue/Requests/zipball/87932f52ffad70504d93f04f15690cf16a089546", - "reference": "87932f52ffad70504d93f04f15690cf16a089546", - "shasum": "" - }, - "require": { - "php": ">=5.2" - }, - "require-dev": { - "requests/test-server": "dev-master" - }, - "type": "library", - "autoload": { - "psr-0": { - "Requests": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Ryan McCue", - "homepage": "http://ryanmccue.info" - } - ], - "description": "A HTTP library written in PHP, for human beings.", - "homepage": "http://github.com/rmccue/Requests", - "keywords": [ - "curl", - "fsockopen", - "http", - "idna", - "ipv6", - "iri", - "sockets" - ], - "time": "2016-10-13T00:11:37+00:00" - }, - { - "name": "seld/cli-prompt", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/cli-prompt.git", - "reference": "a19a7376a4689d4d94cab66ab4f3c816019ba8dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/cli-prompt/zipball/a19a7376a4689d4d94cab66ab4f3c816019ba8dd", - "reference": "a19a7376a4689d4d94cab66ab4f3c816019ba8dd", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Seld\\CliPrompt\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Allows you to prompt for user input on the command line, and optionally hide the characters they type", - "keywords": [ - "cli", - "console", - "hidden", - "input", - "prompt" - ], - "time": "2017-03-18T11:32:45+00:00" - }, - { - "name": "seld/jsonlint", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "50d63f2858d87c4738d5b76a7dcbb99fa8cf7c77" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/50d63f2858d87c4738d5b76a7dcbb99fa8cf7c77", - "reference": "50d63f2858d87c4738d5b76a7dcbb99fa8cf7c77", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "time": "2017-06-18T15:11:04+00:00" - }, - { - "name": "seld/phar-utils", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "7009b5139491975ef6486545a39f3e6dad5ac30a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/7009b5139491975ef6486545a39f3e6dad5ac30a", - "reference": "7009b5139491975ef6486545a39f3e6dad5ac30a", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Seld\\PharUtils\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "PHAR file format utilities, for when PHP phars you up", - "keywords": [ - "phra" - ], - "time": "2015-10-13T18:44:15+00:00" - }, - { - "name": "symfony/config", - "version": "3.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "d668d8c0502d2b485c00d107db65fdbc56c26282" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/d668d8c0502d2b485c00d107db65fdbc56c26282", - "reference": "d668d8c0502d2b485c00d107db65fdbc56c26282", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/filesystem": "~2.8|~3.0|~4.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.3", - "symfony/finder": "<3.3" - }, - "require-dev": { - "symfony/dependency-injection": "~3.3|~4.0", - "symfony/finder": "~3.3|~4.0", - "symfony/yaml": "~3.0|~4.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "https://symfony.com", - "time": "2017-08-05T17:34:46+00:00" - }, - { - "name": "symfony/console", - "version": "3.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "0e283478c2d68c9bf9cc52592ad1ef1834083a85" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0e283478c2d68c9bf9cc52592ad1ef1834083a85", - "reference": "0e283478c2d68c9bf9cc52592ad1ef1834083a85", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/debug": "~2.8|~3.0|~4.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.3", - "symfony/process": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.3|~4.0", - "symfony/dependency-injection": "~3.3|~4.0", - "symfony/event-dispatcher": "~2.8|~3.0|~4.0", - "symfony/http-kernel": "~2.8|~3.0|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.3|~4.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2017-08-10T07:07:17+00:00" - }, - { - "name": "symfony/debug", - "version": "3.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "50bda5b4b8641616d45254c6855bcd45f2f64187" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/50bda5b4b8641616d45254c6855bcd45f2f64187", - "reference": "50bda5b4b8641616d45254c6855bcd45f2f64187", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" - }, - "require-dev": { - "symfony/http-kernel": "~2.8|~3.0|~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com", - "time": "2017-08-10T07:07:17+00:00" - }, - { - "name": "symfony/dependency-injection", - "version": "3.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/dependency-injection.git", - "reference": "aaee88765cb21a838e8da26d6acda4ca2ae3a2ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/aaee88765cb21a838e8da26d6acda4ca2ae3a2ea", - "reference": "aaee88765cb21a838e8da26d6acda4ca2ae3a2ea", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8", - "psr/container": "^1.0" - }, - "conflict": { - "symfony/config": "<3.3.1", - "symfony/finder": "<3.3", - "symfony/proxy-manager-bridge": "<3.4", - "symfony/yaml": "<3.4" - }, - "provide": { - "psr/container-implementation": "1.0" - }, - "require-dev": { - "symfony/config": "~3.3|~4.0", - "symfony/expression-language": "~2.8|~3.0|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "symfony/config": "", - "symfony/expression-language": "For using expressions in service container configuration", - "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\DependencyInjection\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony DependencyInjection Component", - "homepage": "https://symfony.com", - "time": "2017-08-10T19:43:00+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "3.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "cd8b015f859e6b60933324db00067c2f060b4d18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/cd8b015f859e6b60933324db00067c2f060b4d18", - "reference": "cd8b015f859e6b60933324db00067c2f060b4d18", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8" - }, - "conflict": { - "symfony/dependency-injection": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0|~4.0", - "symfony/dependency-injection": "~3.3|~4.0", - "symfony/expression-language": "~2.8|~3.0|~4.0", - "symfony/stopwatch": "~2.8|~3.0|~4.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2017-08-03T09:34:20+00:00" - }, - { - "name": "symfony/filesystem", - "version": "3.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "e4d366b620c8b6e2d4977c154f6a1d5b416db4dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/e4d366b620c8b6e2d4977c154f6a1d5b416db4dd", - "reference": "e4d366b620c8b6e2d4977c154f6a1d5b416db4dd", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2017-08-03T09:34:20+00:00" - }, - { - "name": "symfony/finder", - "version": "3.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "bf0450cfe7282c5f06539c4733ba64273e91e918" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/bf0450cfe7282c5f06539c4733ba64273e91e918", - "reference": "bf0450cfe7282c5f06539c4733ba64273e91e918", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2017-08-03T09:34:20+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803", - "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2017-06-14T15:44:48+00:00" - }, - { - "name": "symfony/process", - "version": "3.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "9794f948d9af3be0157185051275d78b24d68b92" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/9794f948d9af3be0157185051275d78b24d68b92", - "reference": "9794f948d9af3be0157185051275d78b24d68b92", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2017-08-03T09:34:20+00:00" - }, - { - "name": "symfony/translation", - "version": "3.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "62bb068e004874bbe39624101e1aae70ca7c05cd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/62bb068e004874bbe39624101e1aae70ca7c05cd", - "reference": "62bb068e004874bbe39624101e1aae70ca7c05cd", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/config": "<2.8", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/intl": "^2.8.18|^3.2.5|~4.0", - "symfony/yaml": "~3.3|~4.0" - }, - "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Translation Component", - "homepage": "https://symfony.com", - "time": "2017-08-03T12:04:31+00:00" - }, - { - "name": "symfony/yaml", - "version": "3.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc", - "reference": "1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8" - }, - "require-dev": { - "symfony/console": "~2.8|~3.0|~4.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2017-08-04T13:29:48+00:00" - }, - { - "name": "wp-cli/autoload-splitter", - "version": "v0.1.5", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/autoload-splitter.git", - "reference": "fb4302da26390811d2631c62b42b75976d224bb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/autoload-splitter/zipball/fb4302da26390811d2631c62b42b75976d224bb8", - "reference": "fb4302da26390811d2631c62b42b75976d224bb8", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1" - }, - "type": "composer-plugin", - "extra": { - "class": "WP_CLI\\AutoloadSplitter\\ComposerPlugin" - }, - "autoload": { - "psr-4": { - "WP_CLI\\AutoloadSplitter\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alain Schlesser", - "email": "alain.schlesser@gmail.com", - "homepage": "https://www.alainschlesser.com" - } - ], - "description": "Composer plugin for splitting a generated autoloader into two distinct parts.", - "homepage": "https://wp-cli.org", - "time": "2017-08-03T08:40:16+00:00" - }, - { - "name": "wp-cli/cache-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/cache-command.git", - "reference": "485f7cc6630ecabe22bbf9fa9e827958e95a2d21" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/cache-command/zipball/485f7cc6630ecabe22bbf9fa9e827958e95a2d21", - "reference": "485f7cc6630ecabe22bbf9fa9e827958e95a2d21", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~2.5", - "wp-cli/wp-cli": "*" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "bundled": true, - "commands": [ - "cache", - "transient" - ] - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "cache-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Manage object and transient caches.", - "homepage": "https://github.com/wp-cli/cache-command", - "time": "2017-08-04T11:37:19+00:00" - }, - { - "name": "wp-cli/checksum-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/checksum-command.git", - "reference": "88ccde2e82de5c2232842a9fccc2e6ade232dec6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/checksum-command/zipball/88ccde2e82de5c2232842a9fccc2e6ade232dec6", - "reference": "88ccde2e82de5c2232842a9fccc2e6ade232dec6", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~2.5", - "wp-cli/wp-cli": "*" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "bundled": true, - "commands": [ - "checksum core" - ] - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "checksum-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Verify WordPress core checksums.", - "homepage": "https://github.com/wp-cli/checksum-command", - "time": "2017-08-09T23:34:29+00:00" - }, - { - "name": "wp-cli/config-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/config-command.git", - "reference": "ca83ade8fb2d059b561744610947e38123b10c22" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/config-command/zipball/ca83ade8fb2d059b561744610947e38123b10c22", - "reference": "ca83ade8fb2d059b561744610947e38123b10c22", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~2.5", - "wp-cli/wp-cli": "*" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "bundled": true, - "commands": [ - "config", - "config create", - "config get", - "config path" - ] - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "config-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Manage the wp-config.php file.", - "homepage": "https://github.com/wp-cli/config-command", - "time": "2017-08-04T23:41:35+00:00" - }, - { - "name": "wp-cli/core-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/core-command.git", - "reference": "fb743dab792e21b57163c5c0f563987d1471c152" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/core-command/zipball/fb743dab792e21b57163c5c0f563987d1471c152", - "reference": "fb743dab792e21b57163c5c0f563987d1471c152", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~2.5", - "wp-cli/wp-cli": "*" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "bundled": true, - "commands": [ - "core check-update", - "core download", - "core install", - "core is-installed", - "core multisite-convert", - "core multisite-install", - "core update", - "core update-db", - "core version" - ] - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "core-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Download, install, update and manage a WordPress install.", - "homepage": "https://github.com/wp-cli/core-command", - "time": "2017-08-04T12:31:18+00:00" - }, - { - "name": "wp-cli/cron-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/cron-command.git", - "reference": "92114b695ab0253bb705d9bd3e6d2fb47b51fad2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/cron-command/zipball/92114b695ab0253bb705d9bd3e6d2fb47b51fad2", - "reference": "92114b695ab0253bb705d9bd3e6d2fb47b51fad2", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~2.5", - "wp-cli/wp-cli": "*" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "bundled": true, - "commands": [ - "cron test", - "cron event delete", - "cron event list", - "cron event run", - "cron event schedule", - "cron schedule list" - ] - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "cron-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Manage WP-Cron events and schedules.", - "homepage": "https://github.com/wp-cli/cron-command", - "time": "2017-08-04T12:45:50+00:00" - }, - { - "name": "wp-cli/db-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/db-command.git", - "reference": "5c597abb642bcaf329e7da0801c69f4405d41c23" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/db-command/zipball/5c597abb642bcaf329e7da0801c69f4405d41c23", - "reference": "5c597abb642bcaf329e7da0801c69f4405d41c23", - "shasum": "" - }, - "require": { - "wp-cli/wp-cli": "*" - }, - "require-dev": { - "behat/behat": "~2.5" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "bundled": true, - "commands": [ - "db create", - "db drop", - "db reset", - "db check", - "db optimize", - "db prefix", - "db repair", - "db cli", - "db query", - "db export", - "db import", - "db search", - "db tables", - "db size" - ] - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "db-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Perform basic database operations using credentials stored in wp-config.php.", - "homepage": "https://github.com/wp-cli/db-command", - "time": "2017-08-04T23:21:46+00:00" - }, - { - "name": "wp-cli/entity-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/entity-command.git", - "reference": "d0cd99c14e4d01aad368328da97231df0c01f9dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/entity-command/zipball/d0cd99c14e4d01aad368328da97231df0c01f9dc", - "reference": "d0cd99c14e4d01aad368328da97231df0c01f9dc", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~2.5", - "phpunit/phpunit": "^4.8", - "wp-cli/wp-cli": "*" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "bundled": true, - "commands": [ - "comment", - "comment meta", - "menu", - "menu item", - "menu location", - "network meta", - "option", - "option add", - "option delete", - "option get", - "option list", - "option update", - "post", - "post meta", - "post term", - "post-type", - "site", - "taxonomy", - "term", - "term meta", - "user", - "user meta", - "user term" - ] - }, - "autoload": { - "psr-4": { - "": "src/", - "WP_CLI\\": "src/WP_CLI" - }, - "files": [ - "entity-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Manage WordPress core entities.", - "homepage": "https://github.com/wp-cli/entity-command", - "time": "2017-08-11T11:53:04+00:00" - }, - { - "name": "wp-cli/eval-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/eval-command.git", - "reference": "e3d9502a4f8b8f582130dbb3b8ede76e17ac05a4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/eval-command/zipball/e3d9502a4f8b8f582130dbb3b8ede76e17ac05a4", - "reference": "e3d9502a4f8b8f582130dbb3b8ede76e17ac05a4", - "shasum": "" - }, - "require": { - "wp-cli/wp-cli": "*" - }, - "require-dev": { - "behat/behat": "~2.5" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "bundled": true, - "commands": [ - "eval", - "eval-file" - ] - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "eval-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Execute arbitrary PHP code.", - "homepage": "https://github.com/wp-cli/eval-command", - "time": "2017-08-04T12:46:58+00:00" - }, - { - "name": "wp-cli/export-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/export-command.git", - "reference": "f5647155830d1275de4cb69cfb79748b9449b8ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/export-command/zipball/f5647155830d1275de4cb69cfb79748b9449b8ab", - "reference": "f5647155830d1275de4cb69cfb79748b9449b8ab", - "shasum": "" - }, - "require": { - "nb/oxymel": "~0.1.0", - "wp-cli/wp-cli": "*" - }, - "require-dev": { - "behat/behat": "~2.5" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "bundled": true, - "commands": [ - "export" - ] - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "export-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Export WordPress content to a WXR file.", - "homepage": "https://github.com/wp-cli/export-command", - "time": "2017-08-04T13:13:08+00:00" - }, - { - "name": "wp-cli/extension-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/extension-command.git", - "reference": "08bf48e842b9e1cb579b50cec1b6897cebf65bda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/extension-command/zipball/08bf48e842b9e1cb579b50cec1b6897cebf65bda", - "reference": "08bf48e842b9e1cb579b50cec1b6897cebf65bda", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~2.5", - "wp-cli/wp-cli": "*" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "bundled": true, - "commands": [ - "plugin activate", - "plugin deactivate", - "plugin delete", - "plugin get", - "plugin install", - "plugin is-installed", - "plugin list", - "plugin path", - "plugin search", - "plugin status", - "plugin toggle", - "plugin uninstall", - "plugin update", - "theme activate", - "theme delete", - "theme disable", - "theme enable", - "theme get", - "theme install", - "theme is-installed", - "theme list", - "theme mod get", - "theme mod set", - "theme mod remove", - "theme path", - "theme search", - "theme status", - "theme update" - ] - }, - "autoload": { - "psr-4": { - "": "src/", - "WP_CLI\\": "src/WP_CLI" - }, - "files": [ - "extension-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Manage WordPress plugins and themes.", - "homepage": "https://github.com/wp-cli/extension-command", - "time": "2017-08-04T13:43:53+00:00" - }, - { - "name": "wp-cli/import-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/import-command.git", - "reference": "89d14aa4b8b621effbe7f9bacad2ea8a096598a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/import-command/zipball/89d14aa4b8b621effbe7f9bacad2ea8a096598a7", - "reference": "89d14aa4b8b621effbe7f9bacad2ea8a096598a7", - "shasum": "" - }, - "require": { - "wp-cli/wp-cli": "*" - }, - "require-dev": { - "behat/behat": "~2.5" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "bundled": true, - "commands": [ - "import" - ] - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "import-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Import content from a WXR file.", - "homepage": "https://github.com/wp-cli/import-command", - "time": "2017-08-04T13:45:57+00:00" - }, - { - "name": "wp-cli/language-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/language-command.git", - "reference": "aff3fb6c6d7698008c7e5d33a97b25457091ae1b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/language-command/zipball/aff3fb6c6d7698008c7e5d33a97b25457091ae1b", - "reference": "aff3fb6c6d7698008c7e5d33a97b25457091ae1b", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~2.5", - "wp-cli/wp-cli": "*" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "commands": [ - "language core activate", - "language core install", - "language core list", - "language core uninstall", - "language core update" - ], - "bundled": true - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "language-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Manage language packs.", - "homepage": "https://github.com/wp-cli/language-command", - "time": "2017-08-04T23:23:03+00:00" - }, - { - "name": "wp-cli/media-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/media-command.git", - "reference": "4a19de54a11c96b21c10719e2b7f9dd131c4261e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/media-command/zipball/4a19de54a11c96b21c10719e2b7f9dd131c4261e", - "reference": "4a19de54a11c96b21c10719e2b7f9dd131c4261e", - "shasum": "" - }, - "require": { - "wp-cli/wp-cli": "*" - }, - "require-dev": { - "behat/behat": "~2.5" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "commands": [ - "media import", - "media regenerate" - ], - "bundled": true - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "media-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Import new attachments or regenerate existing ones.", - "homepage": "https://github.com/wp-cli/media-command", - "time": "2017-08-05T04:54:48+00:00" - }, - { - "name": "wp-cli/mustangostang-spyc", - "version": "0.6.3", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/spyc.git", - "reference": "6aa0b4da69ce9e9a2c8402dab8d43cf32c581cc7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/spyc/zipball/6aa0b4da69ce9e9a2c8402dab8d43cf32c581cc7", - "reference": "6aa0b4da69ce9e9a2c8402dab8d43cf32c581cc7", - "shasum": "" - }, - "require": { - "php": ">=5.3.1" - }, - "require-dev": { - "phpunit/phpunit": "4.3.*@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.5.x-dev" - } - }, - "autoload": { - "psr-4": { - "Mustangostang\\": "src/" - }, - "files": [ - "includes/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "mustangostang", - "email": "vlad.andersen@gmail.com" - } - ], - "description": "A simple YAML loader/dumper class for PHP (WP-CLI fork)", - "homepage": "https://github.com/mustangostang/spyc/", - "time": "2017-04-25T11:26:20+00:00" - }, - { - "name": "wp-cli/package-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/package-command.git", - "reference": "744692180a4240ddc75a3196934cafe396dd9178" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/package-command/zipball/744692180a4240ddc75a3196934cafe396dd9178", - "reference": "744692180a4240ddc75a3196934cafe396dd9178", - "shasum": "" - }, - "require": { - "composer/composer": "^1.2.0", - "wp-cli/wp-cli": "*" - }, - "require-dev": { - "behat/behat": "~2.5" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "commands": [ - "package browse", - "package install", - "package list", - "package update", - "package uninstall" - ], - "bundled": true - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "package-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Manage WP-CLI packages.", - "homepage": "https://github.com/wp-cli/package-command", - "time": "2017-08-07T12:21:11+00:00" - }, - { - "name": "wp-cli/php-cli-tools", - "version": "v0.11.6", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/php-cli-tools.git", - "reference": "d2a4e2eca9f1cd62a5d30f192d10f74e73eb3a05" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/php-cli-tools/zipball/d2a4e2eca9f1cd62a5d30f192d10f74e73eb3a05", - "reference": "d2a4e2eca9f1cd62a5d30f192d10f74e73eb3a05", - "shasum": "" - }, - "require": { - "php": ">= 5.3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "cli": "lib/" - }, - "files": [ - "lib/cli/cli.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "James Logsdon", - "email": "jlogsdon@php.net", - "role": "Developer" - }, - { - "name": "Daniel Bachhuber", - "email": "daniel@handbuilt.co", - "role": "Maintainer" - } - ], - "description": "Console utilities for PHP", - "homepage": "http://github.com/wp-cli/php-cli-tools", - "keywords": [ - "cli", - "console" - ], - "time": "2017-08-04T10:42:04+00:00" - }, - { - "name": "wp-cli/rewrite-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/rewrite-command.git", - "reference": "e858feac8d3fe053e052d8af43c090ff0b2a4e8a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/rewrite-command/zipball/e858feac8d3fe053e052d8af43c090ff0b2a4e8a", - "reference": "e858feac8d3fe053e052d8af43c090ff0b2a4e8a", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~2.5", - "wp-cli/wp-cli": "*" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "commands": [ - "rewrite flush", - "rewrite list", - "rewrite structure" - ], - "bundled": true - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "rewrite-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Manage rewrite rules.", - "homepage": "https://github.com/wp-cli/rewrite-command", - "time": "2017-08-04T15:15:53+00:00" - }, - { - "name": "wp-cli/role-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/role-command.git", - "reference": "85ddf53525b14ab040830f385710f4493058d295" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/role-command/zipball/85ddf53525b14ab040830f385710f4493058d295", - "reference": "85ddf53525b14ab040830f385710f4493058d295", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~2.5", - "wp-cli/wp-cli": "*" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "commands": [ - "role create", - "role delete", - "role exists", - "role list", - "role reset", - "cap add", - "cap list", - "cap remove" - ], - "bundled": true - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "role-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Manage user roles and capabilities.", - "homepage": "https://github.com/wp-cli/role-command", - "time": "2017-08-04T15:17:29+00:00" - }, - { - "name": "wp-cli/scaffold-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/scaffold-command.git", - "reference": "41f1e1aa41af76b70d6cf3d21d52995e854acf4c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/scaffold-command/zipball/41f1e1aa41af76b70d6cf3d21d52995e854acf4c", - "reference": "41f1e1aa41af76b70d6cf3d21d52995e854acf4c", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~2.5", - "wp-cli/wp-cli": "*" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "commands": [ - "scaffold", - "scaffold _s", - "scaffold child-theme", - "scaffold plugin", - "scaffold plugin-tests", - "scaffold post-type", - "scaffold taxonomy", - "scaffold theme-tests" - ], - "bundled": true - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "scaffold-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Generate code for post types, taxonomies, plugins, child themes, etc.", - "homepage": "https://github.com/wp-cli/scaffold-command", - "time": "2017-08-11T08:07:10+00:00" - }, - { - "name": "wp-cli/search-replace-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/search-replace-command.git", - "reference": "3e7499a65354e3a322d4d1043123b3fa55ef4f12" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/search-replace-command/zipball/3e7499a65354e3a322d4d1043123b3fa55ef4f12", - "reference": "3e7499a65354e3a322d4d1043123b3fa55ef4f12", - "shasum": "" - }, - "require": { - "wp-cli/wp-cli": "*" - }, - "require-dev": { - "behat/behat": "~2.5" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "commands": [ - "search-replace" - ], - "bundled": true - }, - "autoload": { - "psr-4": { - "": "src/", - "WP_CLI\\": "src/WP_CLI" - }, - "files": [ - "search-replace-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Search/replace strings in the database.", - "homepage": "https://github.com/wp-cli/search-replace-command", - "time": "2017-08-08T16:41:49+00:00" - }, - { - "name": "wp-cli/server-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/server-command.git", - "reference": "ce93df07c33e716adbbd2d329c311a3c1dd3a0b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/server-command/zipball/ce93df07c33e716adbbd2d329c311a3c1dd3a0b0", - "reference": "ce93df07c33e716adbbd2d329c311a3c1dd3a0b0", - "shasum": "" - }, - "require": { - "wp-cli/wp-cli": "*" - }, - "require-dev": { - "behat/behat": "~2.5" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "commands": [ - "server" - ], - "bundled": true - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "server-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Launch PHP's built-in web server for this specific WordPress installation.", - "homepage": "https://github.com/wp-cli/server-command", - "time": "2017-08-04T15:19:26+00:00" - }, - { - "name": "wp-cli/shell-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/shell-command.git", - "reference": "70681666302cc193a1bd41bade9ecc61e74a8c83" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/shell-command/zipball/70681666302cc193a1bd41bade9ecc61e74a8c83", - "reference": "70681666302cc193a1bd41bade9ecc61e74a8c83", - "shasum": "" - }, - "require": { - "wp-cli/wp-cli": "*" - }, - "require-dev": { - "behat/behat": "~2.5" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "commands": [ - "shell" - ], - "bundled": true - }, - "autoload": { - "psr-4": { - "": "src/", - "WP_CLI\\": "src/WP_CLI" - }, - "files": [ - "shell-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Interactive PHP console.", - "homepage": "https://github.com/wp-cli/shell-command", - "time": "2017-08-04T15:21:52+00:00" - }, - { - "name": "wp-cli/super-admin-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/super-admin-command.git", - "reference": "b650836d13762c764df2bbe70ad34212c0b773cd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/super-admin-command/zipball/b650836d13762c764df2bbe70ad34212c0b773cd", - "reference": "b650836d13762c764df2bbe70ad34212c0b773cd", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~2.5", - "wp-cli/wp-cli": "*" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "commands": [ - "super-admin add", - "super-admin list", - "super-admin remove" - ], - "bundled": true - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "super-admin-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Manage super admins on WordPress multisite.", - "homepage": "https://github.com/wp-cli/super-admin-command", - "time": "2017-08-04T15:45:41+00:00" - }, - { - "name": "wp-cli/widget-command", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/widget-command.git", - "reference": "727af7c7b661031bc8c04ad176d4f24b862e3402" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/widget-command/zipball/727af7c7b661031bc8c04ad176d4f24b862e3402", - "reference": "727af7c7b661031bc8c04ad176d4f24b862e3402", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~2.5", - "wp-cli/wp-cli": "*" - }, - "type": "wp-cli-package", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "commands": [ - "widget add", - "widget deactivate", - "widget delete", - "widget list", - "widget move", - "widget reset", - "widget update", - "sidebar list" - ], - "bundled": true - }, - "autoload": { - "psr-4": { - "": "src/" - }, - "files": [ - "widget-command.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bachhuber", - "email": "daniel@runcommand.io", - "homepage": "https://runcommand.io" - } - ], - "description": "Manage widgets and sidebars.", - "homepage": "https://github.com/wp-cli/widget-command", - "time": "2017-08-04T15:24:29+00:00" - }, - { - "name": "wp-cli/wp-cli", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/wp-cli/wp-cli.git", - "reference": "4ab0d99da0ad5e6ca39453ff5c82d4f06aecb086" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/4ab0d99da0ad5e6ca39453ff5c82d4f06aecb086", - "reference": "4ab0d99da0ad5e6ca39453ff5c82d4f06aecb086", - "shasum": "" - }, - "require": { - "composer/composer": "^1.2.0", - "composer/semver": "~1.0", - "mustache/mustache": "~2.4", - "php": ">=5.3.29", - "ramsey/array_column": "~1.1", - "rmccue/requests": "~1.6", - "symfony/config": "^2.7|^3.0", - "symfony/console": "^2.7|^3.0", - "symfony/debug": "^2.7|^3.0", - "symfony/dependency-injection": "^2.7|^3.0", - "symfony/event-dispatcher": "^2.7|^3.0", - "symfony/filesystem": "^2.7|^3.0", - "symfony/finder": "^2.7|^3.0", - "symfony/process": "^2.1|^3.0", - "symfony/translation": "^2.7|^3.0", - "symfony/yaml": "^2.7|^3.0", - "wp-cli/autoload-splitter": "^0.1.5", - "wp-cli/cache-command": "^1.0", - "wp-cli/checksum-command": "^1.0", - "wp-cli/config-command": "^1.0", - "wp-cli/core-command": "^1.0", - "wp-cli/cron-command": "^1.0", - "wp-cli/db-command": "^1.0", - "wp-cli/entity-command": "^1.0", - "wp-cli/eval-command": "^1.0", - "wp-cli/export-command": "^1.0", - "wp-cli/extension-command": "^1.0", - "wp-cli/import-command": "^1.0", - "wp-cli/language-command": "^1.0", - "wp-cli/media-command": "^1.0", - "wp-cli/mustangostang-spyc": "^0.6.3", - "wp-cli/package-command": "^1.0", - "wp-cli/php-cli-tools": "~0.11.2", - "wp-cli/rewrite-command": "^1.0", - "wp-cli/role-command": "^1.0", - "wp-cli/scaffold-command": "^1.0", - "wp-cli/search-replace-command": "^1.0", - "wp-cli/server-command": "^1.0", - "wp-cli/shell-command": "^1.0", - "wp-cli/super-admin-command": "^1.0", - "wp-cli/widget-command": "^1.0" - }, - "require-dev": { - "behat/behat": "2.5.*", - "phpunit/phpunit": "3.7.*", - "roave/security-advisories": "dev-master" - }, - "suggest": { - "psy/psysh": "Enhanced `wp shell` functionality" - }, - "bin": [ - "bin/wp.bat", - "bin/wp" - ], - "type": "library", - "extra": { - "autoload-splitter": { - "splitter-logic": "WP_CLI\\AutoloadSplitter", - "splitter-location": "php/WP_CLI/AutoloadSplitter.php", - "split-target-prefix-true": "autoload_commands", - "split-target-prefix-false": "autoload_framework" - } - }, - "autoload": { - "psr-0": { - "WP_CLI": "php" - }, - "psr-4": { - "": "php/commands/src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A command line interface for WordPress", - "homepage": "http://wp-cli.org", - "keywords": [ - "cli", - "wordpress" - ], - "time": "2017-08-08T14:28:58+00:00" - } - ], - "aliases": [], - "minimum-stability": "dev", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/includes/libraries/action-scheduler/docs/CNAME b/includes/libraries/action-scheduler/docs/CNAME deleted file mode 100755 index 3b480b5..0000000 --- a/includes/libraries/action-scheduler/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -actionscheduler.org \ No newline at end of file diff --git a/includes/libraries/action-scheduler/docs/_config.yml b/includes/libraries/action-scheduler/docs/_config.yml deleted file mode 100755 index fe521d9..0000000 --- a/includes/libraries/action-scheduler/docs/_config.yml +++ /dev/null @@ -1,7 +0,0 @@ -title: Action Scheduler - Job Queue for WordPress -description: A scalable, traceable job queue for background processing large queues of tasks in WordPress. Designed for distribution in WordPress plugins - no server access required. -theme: jekyll-theme-hacker -permalink: /:slug/ -plugins: - - jekyll-seo-tag - - jekyll-sitemap diff --git a/includes/libraries/action-scheduler/docs/_layouts/default.html b/includes/libraries/action-scheduler/docs/_layouts/default.html deleted file mode 100755 index 8e8a9c5..0000000 --- a/includes/libraries/action-scheduler/docs/_layouts/default.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - -{% seo %} - - - - -
-
-

Usage | Admin | WP-CLI | Background Processing at Scale | API | FAQ -

action-scheduler

-

A scalable, traceable job queue for background processing large queues of tasks in WordPress. Designed for distribution in WordPress plugins - no server access required.

-
-
- -
-
- {{ content }} -
-
- - - - {% if site.google_analytics %} - - {% endif %} - - \ No newline at end of file diff --git a/includes/libraries/action-scheduler/docs/admin.md b/includes/libraries/action-scheduler/docs/admin.md deleted file mode 100755 index 5ef0b56..0000000 --- a/includes/libraries/action-scheduler/docs/admin.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -description: Learn how to administer background jobs with the Action Scheduler job queue for WordPress. ---- -# Scheduled Actions Administration Screen - -Action Scheduler has a built in administration screen for monitoring, debugging and manually triggering scheduled actions. - -The administration interface is accesible through both: - -1. **Tools > Scheduled Actions** -1. **WooCommerce > Status > Scheduled Actions**, when WooCommerce is installed. - -Among other tasks, from the admin screen you can: - -* run a pending action -* view the scheduled actions with a specific status, like the all actions which have failed or are in-progress (https://cldup.com/NNTwE88Xl8.png). -* view the log entries for a specific action to find out why it failed. -* sort scheduled actions by hook name, scheduled date, claim ID or group name. - -Still have questions? Check out the [FAQ](/faq). - -![](https://cldup.com/5BA2BNB1sw.png) diff --git a/includes/libraries/action-scheduler/docs/android-chrome-192x192.png b/includes/libraries/action-scheduler/docs/android-chrome-192x192.png deleted file mode 100755 index 86753db..0000000 Binary files a/includes/libraries/action-scheduler/docs/android-chrome-192x192.png and /dev/null differ diff --git a/includes/libraries/action-scheduler/docs/android-chrome-256x256.png b/includes/libraries/action-scheduler/docs/android-chrome-256x256.png deleted file mode 100755 index 3e5f9b1..0000000 Binary files a/includes/libraries/action-scheduler/docs/android-chrome-256x256.png and /dev/null differ diff --git a/includes/libraries/action-scheduler/docs/api.md b/includes/libraries/action-scheduler/docs/api.md deleted file mode 100755 index a0bbb5d..0000000 --- a/includes/libraries/action-scheduler/docs/api.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -description: Reference guide for background processing functions provided by the Action Scheduler job queue for WordPress. ---- -# API Reference - -Action Scheduler provides a range of functions for scheduling hooks to run at some time in the future on one or more occassions. - -To understand the scheduling functoins, it can help to think of them as extensions to WordPress' `do_action()` function that add the ability to delay and repeat when the hook will be triggered. - -## WP-Cron APIs vs. Action Scheduler APIs - -The Action Scheduler API functions are designed to mirror the WordPress [WP-Cron API functions](http://codex.wordpress.org/Category:WP-Cron_Functions). - -Functions return similar values and accept similar arguments to their WP-Cron counterparts. The notable differences are: - -* `as_schedule_single_action()` & `as_schedule_recurring_action()` will return the post ID of the scheduled action rather than boolean indicating whether the event was scheduled -* `as_schedule_recurring_action()` takes an interval in seconds as the recurring interval rather than an arbitrary string -* `as_schedule_single_action()` & `as_schedule_recurring_action()` can accept a `$group` parameter to group different actions for the one plugin together. -* the `wp_` prefix is substituted with `as_` and the term `event` is replaced with `action` - -## API Function Availability - -As mentioned in the [Usage - Load Order](/usage/#load-order) section, Action Scheduler will initialize itself on the `'init'` hook with priority `1`. While API functions are loaded prior to this and call be called, they should not be called until after `'init'` with priority `1`, because each component, like the data store, has not yet been initialized. - -Do not use Action Scheduler API functions prior to `'init'` hook with priority `1`. Doing so could lead to unexpected results, like data being stored in the incorrect location. - -## Function Reference / `as_schedule_single_action()` - -### Description - -Schedule an action to run one time. - -### Usage - -```php -as_schedule_single_action( $timestamp, $hook, $args, $group ) -```` - -### Parameters - -- **$timestamp** (integer)(required) The Unix timestamp representing the date you want the action to run. Default: _none_. -- **$hook** (string)(required) Name of the action hook. Default: _none_. -- **$args** (array) Arguments to pass to callbacks when the hook triggers. Default: _`array()`_. -- **$group** (array) The group to assign this job to. Default: _''_. - -### Return value - -(integer) the action's ID in the [posts](http://codex.wordpress.org/Database_Description#Table_Overview) table. - - -## Function Reference / `as_schedule_recurring_action()` - -### Description - -Schedule an action to run repeatedly with a specified interval in seconds. - -### Usage - -```php -as_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args, $group ) -```` - -### Parameters - -- **$timestamp** (integer)(required) The Unix timestamp representing the date you want the action to run. Default: _none_. -- **$interval_in_seconds** (integer)(required) How long to wait between runs. Default: _none_. -- **$hook** (string)(required) Name of the action hook. Default: _none_. -- **$args** (array) Arguments to pass to callbacks when the hook triggers. Default: _`array()`_. -- **$group** (array) The group to assign this job to. Default: _''_. - -### Return value - -(integer) the action's ID in the [posts](http://codex.wordpress.org/Database_Description#Table_Overview) table. - - -## Function Reference / `as_schedule_cron_action()` - -### Description - -Schedule an action that recurs on a cron-like schedule. - -### Usage - -```php -as_schedule_cron_action( $timestamp, $schedule, $hook, $args, $group ) -```` - -### Parameters - -- **$timestamp** (integer)(required) The Unix timestamp representing the date you want the action to run. Default: _none_. -- **$schedule** (string)(required) $schedule A cron-link schedule string, see http://en.wikipedia.org/wiki/Cron. Default: _none_. -- **$hook** (string)(required) Name of the action hook. Default: _none_. -- **$args** (array) Arguments to pass to callbacks when the hook triggers. Default: _`array()`_. -- **$group** (array) The group to assign this job to. Default: _''_. - -### Return value - -(integer) the action's ID in the [posts](http://codex.wordpress.org/Database_Description#Table_Overview) table. - - -## Function Reference / `as_unschedule_action()` - -### Description - -Cancel the next occurrence of a job. - -### Usage - -```php -as_unschedule_action( $hook, $args, $group ) -```` - -### Parameters - -- **$hook** (string)(required) Name of the action hook. Default: _none_. -- **$args** (array) Arguments to pass to callbacks when the hook triggers. Default: _`array()`_. -- **$group** (array) The group to assign this job to. Default: _''_. - -### Return value - -(null) - - -## Function Reference / `as_next_scheduled_action()` - -### Description - -Returns the next timestamp for a scheduled action. - -### Usage - -```php -as_next_scheduled_action( $hook, $args, $group ) -```` - -### Parameters - -- **$hook** (string)(required) Name of the action hook. Default: _none_. -- **$args** (array) Arguments to pass to callbacks when the hook triggers. Default: _`array()`_. -- **$group** (array) The group to assign this job to. Default: _''_. - -### Return value - -(integer|boolean) The timestamp for the next occurrence, or false if nothing was found. - - -## Function Reference / `as_get_scheduled_actions()` - -### Description - -Find scheduled actions. - -### Usage - -```php -as_get_scheduled_actions( $args, $return_format ) -```` - -### Parameters - -- **$args** (array) Arguments to search and filter results by. Possible arguments, with their default values: - * `'hook' => ''` - the name of the action that will be triggered - * `'args' => NULL` - the args array that will be passed with the action - * `'date' => NULL` - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). - * `'date_compare' => '<=`' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '=' - * `'modified' => NULL` - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). - * `'modified_compare' => '<='` - operator for testing "modified". accepted values are '!=', '>', '>=', '<', '<=', '=' - * `'group' => ''` - the group the action belongs to - * `'status' => ''` - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING - * `'claimed' => NULL` - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID - * `'per_page' => 5` - Number of results to return - * `'offset' => 0` - * `'orderby' => 'date'` - accepted values are 'hook', 'group', 'modified', or 'date' - * `'order' => 'ASC'` -- **$return_format** (string) The format in which to return the scheduled actions: 'OBJECT', 'ARRAY_A', or 'ids'. Default: _'OBJECT'_. - -### Return value - -(array) Array of the actions matching the criteria specified with `$args`. diff --git a/includes/libraries/action-scheduler/docs/apple-touch-icon.png b/includes/libraries/action-scheduler/docs/apple-touch-icon.png deleted file mode 100755 index 1bc4975..0000000 Binary files a/includes/libraries/action-scheduler/docs/apple-touch-icon.png and /dev/null differ diff --git a/includes/libraries/action-scheduler/docs/assets/css/style.scss b/includes/libraries/action-scheduler/docs/assets/css/style.scss deleted file mode 100755 index 67fe6b6..0000000 --- a/includes/libraries/action-scheduler/docs/assets/css/style.scss +++ /dev/null @@ -1,32 +0,0 @@ ---- ---- - -@import "{{ site.theme }}"; - -a { - text-shadow: none; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -header h1 a { - color: #b5e853; -} - -.container { - max-width: 700px; -} - -footer { - margin-top: 6em; - padding: 1.6em 0; - border-top: 1px dashed #b5e853; -} - -.footer-image { - text-align: center; - padding-top: 1em; -} \ No newline at end of file diff --git a/includes/libraries/action-scheduler/docs/browserconfig.xml b/includes/libraries/action-scheduler/docs/browserconfig.xml deleted file mode 100755 index f6244e6..0000000 --- a/includes/libraries/action-scheduler/docs/browserconfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - #151515 - - - diff --git a/includes/libraries/action-scheduler/docs/faq.md b/includes/libraries/action-scheduler/docs/faq.md deleted file mode 100755 index 38f07f5..0000000 --- a/includes/libraries/action-scheduler/docs/faq.md +++ /dev/null @@ -1,101 +0,0 @@ -## FAQ - -### Is it safe to release Action Scheduler in my plugin? Won't its functions conflict with another copy of the library? - -Action Scheduler is designed to be used and released in plugins. It avoids redeclaring public API functions when more than one copy of the library is being loaded by different plugins. It will also load only the most recent version of itself (by checking registered versions after all plugins are loaded on the `'plugins_loaded'` hook). - -To use it in your plugin, simply require the `action-scheduler/action-scheduler.php` file. Action Scheduler will take care of the rest. - -### I don't want to use WP-Cron. Does Action Scheduler depend on WP-Cron? - -By default, Action Scheduler is initiated by WP-Cron. However, it has no dependency on the WP-Cron system. You can initiate the Action Scheduler queue in other ways with just one or two lines of code. - -For example, you can start a queue directly by calling: - -```php -ActionScheduler::runner()->run(); -``` - -Or trigger the `'action_scheduler_run_queue'` hook and let Action Scheduler do it for you: - -```php -do_action( 'action_scheduler_run_queue' ); -``` - -Further customization can be done by extending the `ActionScheduler_Abstract_QueueRunner` class to create a custom Queue Runner. For an example of a customized queue runner, see the [`ActionScheduler_WPCLI_QueueRunner`](https://github.com/Prospress/action-scheduler/blob/master/classes/ActionScheduler_WPCLI_QueueRunner.php), which is used when running WP CLI. - -Want to create some other method for initiating Action Scheduler? [Open a new issue](https://github.com/Prospress/action-scheduler/issues/new), we'd love to help you with it. - -### I don't want to use WP-Cron, ever. Does Action Scheduler replace WP-Cron? - -By default, Action Scheduler is designed to work alongside WP-Cron and not change any of its behaviour. This helps avoid unexpectedly overriding WP-Cron on sites installing your plugin, which may have nothing to do with WP-Cron. - -However, we can understand why you might want to replace WP-Cron completely in environments within you control, especially as it gets you the advantages of Action Scheduler. This should be possible without too much code. - -You could use the `'schedule_event'` hook in WordPress to use Action Scheduler for only newly scheduled WP-Cron jobs and map the `$event` param to Action Scheduler API functions. - -Alternatively, you can use a combination of the `'pre_update_option_cron'` and `'pre_option_cron'` hooks to override all new and previously scheduled WP-Cron jobs (similar to the way [Cavalcade](https://github.com/humanmade/Cavalcade) does it). - -If you'd like to create a plugin to do this automatically and want to share your work with others, [open a new issue to let us know](https://github.com/Prospress/action-scheduler/issues/new), we'd love to help you with it. - -### Eww gross, Custom Post Types! That's _so_ 2010. Can I use a different storage scheme? - -Of course! Action Scheduler data storage is completely swappable, and always has been. - -You can store scheduled actions in custom tables in the WordPress site's database. Some sites using it already are. You can actually store them anywhere for that matter, like in a remote storage service from Amazon Web Services. - -To implement a custom store: - -1. extend the abstract `ActionScheduler_Store` class, being careful to implement each of its methods -2. attach a callback to `'action_scheduler_store_class'` to tell Action Scheduler your class is the one which should be used to manage storage, e.g. - -``` -function eg_define_custom_store( $existing_storage_class ) { - return 'My_Radical_Action_Scheduler_Store'; -} -add_filter( 'action_scheduler_store_class', 'eg_define_custom_store', 10, 1 ); -``` - -Take a look at the `ActionScheduler_wpPostStore` class for an example implementation of `ActionScheduler_Store`. - -If you'd like to create a plugin to do this automatically and release it publicly to help others, [open a new issue to let us know](https://github.com/Prospress/action-scheduler/issues/new), we'd love to help you with it. - -> Note: we're also moving Action Scheduler itself to use [custom tables for better scalability](https://github.com/Prospress/action-scheduler/issues/77). - -### Can I use a different storage scheme just for logging? - -Of course! Action Scheduler's logger is completely swappable, and always has been. You can also customise where logs are stored, and the storage mechanism. - -To implement a custom logger: - -1. extend the abstract `ActionScheduler_Logger` class, being careful to implement each of its methods -2. attach a callback to `'action_scheduler_logger_class'` to tell Action Scheduler your class is the one which should be used to manage logging, e.g. - -``` -function eg_define_custom_logger( $existing_storage_class ) { - return 'My_Radical_Action_Scheduler_Logger'; -} -add_filter( 'action_scheduler_logger_class', 'eg_define_custom_logger', 10, 1 ); -``` - -Take a look at the `ActionScheduler_wpCommentLogger` class for an example implementation of `ActionScheduler_Logger`. - -### I want to run Action Scheduler only on a dedicated application server in my cluster. Can I do that? - -Wow, now you're really asking the tough questions. In theory, yes, this is possible. The `ActionScheduler_QueueRunner` class, which is responsible for running queues, is swappable via the `'action_scheduler_queue_runner_class'` filter. - -Because of this, you can effectively customise queue running however you need. Whether that means tweaking minor things, like not using WP-Cron at all to initiate queues by overriding `ActionScheduler_QueueRunner::init()`, or completely changing how and where queues are run, by overriding `ActionScheduler_QueueRunner::run()`. - -### Is Action Scheduler safe to use on my production site? - -Yes, absolutely! Action Scheduler is actively used on tens of thousands of production sites already. Right now it's responsible for scheduling everything from emails to payments. - -In fact, every month, Action Scheduler processes millions of payments as part of the [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/) extension. - -It requires no setup, and won't override any WordPress APIs (unless you want it to). - -### How does Action Scheduler work on WordPress Multisite? - -Action Scheduler is designed to manage the scheduled actions on a single site. It has no special handling for running queues across multiple sites in a multisite network. That said, because it's storage and Queue Runner are completely swappable, it would be possible to write multisite handling classes to use with it. - -If you'd like to create a multisite plugin to do this and release it publicly to help others, [open a new issue to let us know](https://github.com/Prospress/action-scheduler/issues/new), we'd love to help you with it. diff --git a/includes/libraries/action-scheduler/docs/favicon-16x16.png b/includes/libraries/action-scheduler/docs/favicon-16x16.png deleted file mode 100755 index aa772d1..0000000 Binary files a/includes/libraries/action-scheduler/docs/favicon-16x16.png and /dev/null differ diff --git a/includes/libraries/action-scheduler/docs/favicon-32x32.png b/includes/libraries/action-scheduler/docs/favicon-32x32.png deleted file mode 100755 index 773fb30..0000000 Binary files a/includes/libraries/action-scheduler/docs/favicon-32x32.png and /dev/null differ diff --git a/includes/libraries/action-scheduler/docs/favicon.ico b/includes/libraries/action-scheduler/docs/favicon.ico deleted file mode 100755 index 3cdbb51..0000000 Binary files a/includes/libraries/action-scheduler/docs/favicon.ico and /dev/null differ diff --git a/includes/libraries/action-scheduler/docs/google14ef723abb376cd3.html b/includes/libraries/action-scheduler/docs/google14ef723abb376cd3.html deleted file mode 100755 index f3bf171..0000000 --- a/includes/libraries/action-scheduler/docs/google14ef723abb376cd3.html +++ /dev/null @@ -1 +0,0 @@ -google-site-verification: google14ef723abb376cd3.html \ No newline at end of file diff --git a/includes/libraries/action-scheduler/docs/index.md b/includes/libraries/action-scheduler/docs/index.md deleted file mode 100755 index 989f262..0000000 --- a/includes/libraries/action-scheduler/docs/index.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: Action Scheduler - Background Processing Job Queue for WordPress ---- -## WordPress Job Queue with Background Processing - -Action Scheduler is a library for triggering a WordPress hook to run at some time in the future. Each hook can be scheduled with unique data, to allow callbacks to perform operations on that data. The hook can also be scheduled to run on one or more occassions. - -Think of it like an extension to `do_action()` which adds the ability to delay and repeat a hook. - -It just so happens, this functionality also creates a robust job queue for background processing large queues of tasks in WordPress. With the additional of logging and an [administration interface](/admin/), that also provide tracability on your tasks processed in the background. - -### Battle-Tested Background Processing - -Every month, Action Scheduler processes millions of payments for [Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/), webhooks for [WooCommerce](https://wordpress.org/plugins/woocommerce/), as well as emails and other events for a range of other plugins. - -It's been seen on live sites processing queues in excess of 50,000 jobs and doing resource intensive operations, like processing payments and creating orders, in 10 concurrent queues at a rate of over 10,000 actions / hour without negatively impacting normal site operations. - -This is all possible on infrastructure and WordPress sites outside the control of the plugin author. - -Action Scheduler is specifically designed for distribution in WordPress plugins (and themes) - no server access required. If your plugin needs background processing, especially of large sets of tasks, Action Scheduler can help. - -### How it Works - -Action Scheduler uses a WordPress [custom post type](http://codex.wordpress.org/Post_Types), creatively named `scheduled-action`, to store the hook name, arguments and scheduled date for an action that should be triggered at some time in the future. - -The scheduler will attempt to run every minute by attaching itself as a callback to the `'action_scheduler_run_schedule'` hook, which is scheduled using WordPress's built-in [WP-Cron](http://codex.wordpress.org/Function_Reference/wp_cron) system. - -When triggered, Action Scheduler will check for posts of the `scheduled-action` type that have a `post_date` at or before this point in time i.e. actions scheduled to run now or at sometime in the past. - -### Batch Processing Background Jobs - -If there are actions to be processed, Action Scheduler will stake a unique claim for a batch of 20 actions and begin processing that batch. The PHP process spawned to run the batch will then continue processing batches of 20 actions until it times out or exhausts available memory. - -If your site has a large number of actions scheduled to run at the same time, Action Scheduler will process more than one batch at a time. Specifically, when the `'action_scheduler_run_schedule'` hook is triggered approximately one minute after the first batch began processing, a new PHP process will stake a new claim to a batch of actions which were not claimed by the previous process. It will then begin to process that batch. - -This will continue until all actions are processed using a maximum of 5 concurrent queues. - -### Housekeeping - -Before processing a batch, the scheduler will remove any existing claims on actions which have been sitting in a queue for more than five minutes. - -Action Scheduler will also trash any actions which were completed more than a month ago. - -If an action runs for more than 5 minutes, Action Scheduler will assume the action has timed out and will mark it as failed. However, if all callbacks attached to the action were to successfully complete sometime after that 5 minute timeout, its status would later be updated to completed. - -### Traceable Background Processing - -Did your background job run? - -Never be left wondering with Action Scheduler's built-in record keeping. - -All events for each action are logged in the [comments table](http://codex.wordpress.org/Database_Description#Table_Overview) and displayed in the [administration interface](/admin/). - -The events logged by default include when an action: - * is created - * starts - * completes - * fails - -If it fails with an error that can be recorded, that error will be recorded in the log and visible in administration interface, making it possible to trace what went wrong at some point in the past on a site you didn't have access to in the past. - -Actions can also be grouped together using a custom taxonomy named `action-group`. - -## Credits - -Developed and maintained by [Prospress](http://prospress.com/) in collaboration with [Flightless](https://flightless.us/). - -Collaboration is cool. We'd love to work with you to improve Action Scheduler. [Pull Requests](https://github.com/prospress/action-scheduler/pulls) welcome. \ No newline at end of file diff --git a/includes/libraries/action-scheduler/docs/mstile-150x150.png b/includes/libraries/action-scheduler/docs/mstile-150x150.png deleted file mode 100755 index 3a3ed19..0000000 Binary files a/includes/libraries/action-scheduler/docs/mstile-150x150.png and /dev/null differ diff --git a/includes/libraries/action-scheduler/docs/perf.md b/includes/libraries/action-scheduler/docs/perf.md deleted file mode 100755 index 542792d..0000000 --- a/includes/libraries/action-scheduler/docs/perf.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: WordPress Background Processing at Scale - Action Scheduler Job Queue -description: Learn how to do WordPress background processing at scale by tuning the Action Scheduler job queue's default WP Cron runner. ---- -# Background Processing at Scale - -Action Scheduler's default processing is designed to work reliably across all different hosting environments. In order to achieve that, the default processing thresholds are very conservative. - -Specifically, Action Scheduler will only process actions until: - -* 90% of available memory is used -* processing another 3 actions would exceed 30 seconds of total request time, based on the average processing time for the current batch - -On sites with large queues, this can result in very slow processing time. - -While using [WP CLI to process queues](/wp-cli/) is the best approach to increasing processing speed, on occasion, that is not a viable option. In these cases, it's also possible to increase the processing thresholds in Action Scheduler to increase the rate at which actions are processed by the default WP Cron queue runner. - -## Increasing Time Limit - -By default, Action Scheduler will only process actions for a maximum of 30 seconds. This time limit minimises the risk of a script timeout on unknown hosting environments, some of which enforce 30 second timeouts. - -If you know your host supports longer than this time limit for web requests, you can increase this time limit. This allows more actions to be processed in each request and reduces the lag between processing each queue, greating speeding up the processing rate of scheduled actions. - -For example, the following snippet will increase the timelimit to 2 minutes (120 seconds): - -```php -function eg_increase_time_limit( $time_limit ) { - return 120; -} -add_filter( 'action_scheduler_queue_runner_time_limit', 'eg_increase_time_limit' ); -``` - -Some of the known host time limits are: - -* 60 second on WP Engine -* 120 seconds on Pantheon -* 120 seconds on SiteGround - -## Increasing Batch Size - -By default, Action Scheduler will claim a batch of 25 actions. This small batch size is because the default time limit is only 30 seconds; however, if you know your actions are processing very quickly, e.g. taking microseconds not seconds, or that you have more than 30 second available to process each batch, increasing the batch size can improve performance. - -This is because claiming a batch has some overhead, so the less often a batch needs to be claimed, the faster actions can be processed. - -For example, to increase the batch size to 100, we can use the following function: - -```php -function eg_increase_action_scheduler_batch_size( $batch_size ) { - return 100; -} -add_filter( 'action_scheduler_queue_runner_batch_size', 'eg_increase_action_scheduler_batch_size' ); -``` - -## Increasing Concurrent Batches - -By default, Action Scheduler will run up to 5 concurrent batches of actions. This is to prevent consuming all the available connections or processes on your webserver. - -However, your server may allow a large number of connection, for example, because it has a high value for Apache's `MaxClients` setting or PHP-FPM's `pm.max_children` setting. - -If this is the case, you can use the `'action_scheduler_queue_runner_concurrent_batches'` filter to increase the number of conncurrent batches allowed, and therefore speed up processing large numbers of actions scheduled to be processed simultaneously. - -For example, to increase the allowed number of concurrent queues to 10, we can use the following code: - -```php -function eg_increase_action_scheduler_concurrent_batches( $concurrent_batches ) { - return 10; -} -add_filter( 'action_scheduler_queue_runner_concurrent_batches', 'eg_increase_action_scheduler_concurrent_batches' ); -``` - -## Increasing Initialisation Rate of Runners - -By default, Action scheduler initiates at most, one queue runner every time the `'action_scheduler_run_queue'` action is triggered by WP Cron. - -Because this action is only triggered at most once every minute, if a queue is only allowed to process for one minute, then there will never be more than one queue processing actions, greatly reducing the processing rate. - -To handle larger queues on more powerful servers, it's a good idea to initiate additional queue runners whenever the `'action_scheduler_run_queue'` action is run. - -That can be done by initiated additional secure requests to our server via loopback requests. - -The code below demonstrates how to create 5 loopback requests each time a queue begins - -```php -/** - * Trigger 5 additional loopback requests with unique URL params. - */ -function eg_request_additional_runners() { - - // allow self-signed SSL certificates - add_filter( 'https_local_ssl_verify', '__return_false', 100 ); - - for ( $i = 0; $i < 5; $i++ ) { - $response = wp_remote_post( admin_url( 'admin-ajax.php' ), array( - 'method' => 'POST', - 'timeout' => 45, - 'redirection' => 5, - 'httpversion' => '1.0', - 'blocking' => false, - 'headers' => array(), - 'body' => array( - 'action' => 'eg_create_additional_runners', - 'instance' => $i, - 'eg_nonce' => wp_create_nonce( 'eg_additional_runner_' . $i ), - ), - 'cookies' => array(), - ) ); - } -} -add_action( 'action_scheduler_run_queue', 'eg_request_additional_runners', 0 ); - -/** - * Handle requests initiated by eg_request_additional_runners() and start a queue runner if the request is valid. - */ -function eg_create_additional_runners() { - - if ( isset( $_POST['eg_nonce'] ) && isset( $_POST['instance'] ) && wp_verify_nonce( $_POST['eg_nonce'], 'eg_additional_runner_' . $_POST['instance'] ) ) { - ActionScheduler_QueueRunner::instance()->run(); - } - - wp_die(); -} -add_action( 'wp_ajax_nopriv_eg_create_additional_runners', 'eg_create_additional_runners', 0 ); -``` - -## High Volume Plugin - -It's not necessary to add all of this code yourself, the folks at [Prospress](https://prospress.com) have created a handy plugin to get access to each of these increases - the [Action Scheduler - High Volume](https://github.com/prospress/action-scheduler-high-volume) plugin. diff --git a/includes/libraries/action-scheduler/docs/safari-pinned-tab.svg b/includes/libraries/action-scheduler/docs/safari-pinned-tab.svg deleted file mode 100755 index b67c32b..0000000 --- a/includes/libraries/action-scheduler/docs/safari-pinned-tab.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - -Created by potrace 1.11, written by Peter Selinger 2001-2013 - - - - - diff --git a/includes/libraries/action-scheduler/docs/site.webmanifest b/includes/libraries/action-scheduler/docs/site.webmanifest deleted file mode 100755 index de65106..0000000 --- a/includes/libraries/action-scheduler/docs/site.webmanifest +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "", - "short_name": "", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-256x256.png", - "sizes": "256x256", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -} diff --git a/includes/libraries/action-scheduler/docs/usage.md b/includes/libraries/action-scheduler/docs/usage.md deleted file mode 100755 index dda4ed7..0000000 --- a/includes/libraries/action-scheduler/docs/usage.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -description: Learn how to use the Action Scheduler background processing job queue for WordPress in your WordPress plugin. ---- -# Usage - -Using Action Scheduler requires: - -1. installing the library -1. scheduling and action -1. attaching a callback to that action - -## Scheduling an Action - -To schedule an action, call the [API function](/api/) for the desired schedule type passing in the required parameters. - -The example code below shows everything needed to schedule a function to run at midnight, if it's not already scheduled: - -```php -require_once( plugin_dir_path( __FILE__ ) . '/libraries/action-scheduler/action-scheduler.php' ); - -/** - * Schedule an action with the hook 'eg_midnight_log' to run at midnight each day - * so that our callback is run then. - */ -function eg_log_action_data() { - if ( false === as_next_scheduled_action( 'eg_midnight_log' ) ) { - as_schedule_recurring_action( strtotime( 'midnight tonight' ), DAY_IN_SECONDS, 'eg_midnight_log' ); - } -} -add_action( 'init', 'eg_log_action_data' ); - -/** - * A callback to run when the 'eg_midnight_log' scheduled action is run. - */ -function eg_log_action_data() { - error_log( 'It is just after midnight on ' . date( 'Y-m-d' ) ); -} -add_action( 'eg_midnight_log', 'eg_log_action_data' ); -``` - -For more details on all available API functions, and the data they accept, refer to the [API Reference](/api/). - -## Installation - -There are two ways to install Action Scheduler: - -1. regular WordPress plugin; or -1. a library within your plugin's codebase. - -### Usage as a Plugin - -Action Scheduler includes the necessary file headers to be used as a standard WordPress plugin. - -To install it as a plugin: - -1. Download the .zip archive of the latest [stable release](https://github.com/Prospress/action-scheduler/releases) -1. Go to the **Plugins > Add New > Upload** administration screen on your WordPress site -1. Select the archive file you just downloaded -1. Click **Install Now** -1. Click **Activate** - -Or clone the Git repository into your site's `wp-content/plugins` folder. - -Using Action Scheduler as a plugin can be handy for developing against newer versions, rather than having to update the subtree in your codebase. **When installed as a plugin, Action Scheduler does not provide any user interfaces for scheduling actions**. The only way to interact with Action Scheduler is via code. - -### Usage as a Library - -To use Action Scheduler as a library: - -1. include the Action Scheduler codebase -1. load the library by including the `action-scheduler.php` file - -Using a [subtree in your plugin, theme or site's Git repository](https://www.atlassian.com/blog/git/alternatives-to-git-submodule-git-subtree) to include Action Scheduler is the recommended method. Composer can also be used. - -To include Action Scheduler as a git subtree: - -#### Step 1. Add the Repository as a Remote - -``` -git remote add -f subtree-action-scheduler https://github.com/Prospress/action-scheduler.git -``` - -Adding the subtree as a remote allows us to refer to it in short from via the name `subtree-action-scheduler`, instead of the full GitHub URL. - -#### Step 2. Add the Repo as a Subtree - -``` -git subtree add --prefix libraries/action-scheduler subtree-action-scheduler master --squash -``` - -This will add the `master` branch of Action Scheduler to your repository in the folder `libraries/action-scheduler`. - -You can change the `--prefix` to change where the code is included. Or change the `master` branch to a tag, like `2.1.0` to include only a stable version. - -#### Step 3. Update the Subtree - -To update Action Scheduler to a new version, use the commands: - -``` -git fetch subtree-action-scheduler master -git subtree pull --prefix libraries/action-scheduler subtree-action-scheduler master --squash -``` - -### Loading Action Scheduler - -Regardless of how it is installed, to load Action Scheduler, you only need to include the `action-scheduler.php` file, e.g. - -```php - + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. \ No newline at end of file +. diff --git a/includes/wcs-compatibility-functions.php b/includes/wcs-compatibility-functions.php index 41b0c76..353bbed 100755 --- a/includes/wcs-compatibility-functions.php +++ b/includes/wcs-compatibility-functions.php @@ -63,8 +63,13 @@ function wcs_help_tip( $tip, $allow_html = false ) { * @return mixed */ function wcs_get_objects_property( $object, $property, $single = 'single', $default = null ) { + $value = ! is_null( $default ) ? $default : ( ( 'single' === $single ) ? null : array() ); + + if ( ! is_object( $object ) ) { + return $value; + } + $prefixed_key = wcs_maybe_prefix_key( $property ); - $value = ! is_null( $default ) ? $default : ( ( 'single' === $single ) ? null : array() ); $property_function_map = array( 'order_version' => 'version', 'order_currency' => 'currency', diff --git a/languages/woocommerce-subscriptions.pot b/languages/woocommerce-subscriptions.pot index 9087956..5d532cf 100755 --- a/languages/woocommerce-subscriptions.pot +++ b/languages/woocommerce-subscriptions.pot @@ -2,10 +2,10 @@ # This file is distributed under the same license as the WooCommerce Subscriptions package. msgid "" msgstr "" -"Project-Id-Version: WooCommerce Subscriptions 2.5.3\n" +"Project-Id-Version: WooCommerce Subscriptions 2.5.6\n" "Report-Msgid-Bugs-To: " "https://github.com/Prospress/woocommerce-subscriptions/issues\n" -"POT-Creation-Date: 2019-03-20 06:30:32+00:00\n" +"POT-Creation-Date: 2019-05-30 20:02:46+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -223,8 +223,8 @@ msgstr "" #: includes/admin/class-wcs-admin-reports.php:46 #: includes/admin/class-wcs-admin-system-status.php:56 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:688 -#: includes/class-wcs-query.php:115 includes/class-wcs-query.php:142 -#: includes/class-wcs-query.php:296 +#: includes/class-wcs-query.php:116 includes/class-wcs-query.php:143 +#: includes/class-wcs-query.php:297 #: includes/privacy/class-wcs-privacy-exporters.php:51 #: woocommerce-subscriptions.php:254 woocommerce-subscriptions.php:267 msgid "Subscriptions" @@ -253,7 +253,7 @@ msgstr "" #: includes/class-wc-product-subscription.php:72 #: includes/class-wc-product-variable-subscription.php:73 #: includes/class-wc-subscriptions-product.php:99 -#: woocommerce-subscriptions.php:578 +#: woocommerce-subscriptions.php:580 msgid "Sign Up Now" msgstr "" @@ -406,7 +406,7 @@ msgstr "" #: includes/admin/class-wc-subscriptions-admin.php:1321 #: includes/upgrades/templates/wcs-about-2-0.php:35 #: includes/upgrades/templates/wcs-about.php:34 -#: woocommerce-subscriptions.php:1110 +#: woocommerce-subscriptions.php:1112 msgid "Settings" msgstr "" @@ -502,38 +502,38 @@ msgstr "" msgid "Note that purchasing a subscription still requires an account." msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:63 -#: includes/admin/class-wcs-admin-meta-boxes.php:67 +#: includes/admin/class-wcs-admin-meta-boxes.php:65 +#: includes/admin/class-wcs-admin-meta-boxes.php:69 #: templates/myaccount/related-orders.php:15 msgid "Related Orders" msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:107 +#: includes/admin/class-wcs-admin-meta-boxes.php:109 msgid "Please enter a start date in the past." msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:108 +#: includes/admin/class-wcs-admin-meta-boxes.php:110 msgid "Please enter a date at least one hour into the future." msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:109 +#: includes/admin/class-wcs-admin-meta-boxes.php:111 msgid "Please enter a date after the trial end." msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:110 -#: includes/admin/class-wcs-admin-meta-boxes.php:111 +#: includes/admin/class-wcs-admin-meta-boxes.php:112 +#: includes/admin/class-wcs-admin-meta-boxes.php:113 msgid "Please enter a date after the start date." msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:112 +#: includes/admin/class-wcs-admin-meta-boxes.php:114 msgid "Please enter a date before the next payment." msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:113 +#: includes/admin/class-wcs-admin-meta-boxes.php:115 msgid "Please enter a date after the next payment." msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:114 +#: includes/admin/class-wcs-admin-meta-boxes.php:116 msgid "" "Are you sure you want to process a renewal?\n" "\n" @@ -541,7 +541,7 @@ msgid "" "are enabled)." msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:124 +#: includes/admin/class-wcs-admin-meta-boxes.php:126 msgid "" "Are you sure you want to retry payment for this renewal order?\n" "\n" @@ -549,31 +549,31 @@ msgid "" "emails are enabled)." msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:153 +#: includes/admin/class-wcs-admin-meta-boxes.php:159 msgid "Process renewal" msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:157 +#: includes/admin/class-wcs-admin-meta-boxes.php:163 msgid "Create pending renewal order" msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:159 +#: includes/admin/class-wcs-admin-meta-boxes.php:165 msgid "Create pending parent order" msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:162 +#: includes/admin/class-wcs-admin-meta-boxes.php:169 msgid "Retry Renewal Payment" msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:176 +#: includes/admin/class-wcs-admin-meta-boxes.php:183 msgid "Process renewal order action requested by admin." msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:200 +#: includes/admin/class-wcs-admin-meta-boxes.php:207 msgid "Create pending renewal order requested by admin action." msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:229 +#: includes/admin/class-wcs-admin-meta-boxes.php:236 msgid "Create pending parent order requested by admin action." msgstr "" @@ -1062,7 +1062,7 @@ msgstr[1] "" #: includes/admin/reports/class-wcs-report-dashboard.php:212 #. translators: 1$: count, 2$ and 3$ are opening and closing strong tags, #. respectively. -msgid "%2$s%$1s signup%3$s subscription signups this month" +msgid "%2$s%1$s signup%3$s subscription signups this month" msgid_plural "%2$s%1$s signups%3$s subscription signups this month" msgstr[0] "" msgstr[1] "" @@ -1858,7 +1858,7 @@ msgid "That doesn't appear to be one of your subscriptions." msgstr "" #: includes/class-wc-subscriptions-change-payment-gateway.php:254 -#: includes/class-wcs-query.php:252 +#: includes/class-wcs-query.php:253 msgid "The payment method can not be changed for that subscription." msgstr "" @@ -1911,118 +1911,118 @@ msgstr "" msgid "Error %d: Unable to create order. Please try again." msgstr "" -#: includes/class-wc-subscriptions-coupon.php:151 +#: includes/class-wc-subscriptions-coupon.php:163 msgid "Sign Up Fee Discount" msgstr "" -#: includes/class-wc-subscriptions-coupon.php:152 +#: includes/class-wc-subscriptions-coupon.php:164 msgid "Sign Up Fee % Discount" msgstr "" -#: includes/class-wc-subscriptions-coupon.php:153 +#: includes/class-wc-subscriptions-coupon.php:165 msgid "Recurring Product Discount" msgstr "" -#: includes/class-wc-subscriptions-coupon.php:154 +#: includes/class-wc-subscriptions-coupon.php:166 msgid "Recurring Product % Discount" msgstr "" -#: includes/class-wc-subscriptions-coupon.php:444 +#: includes/class-wc-subscriptions-coupon.php:456 msgid "" "Sorry, this coupon is only valid for an initial payment and the cart does " "not require an initial payment." msgstr "" -#: includes/class-wc-subscriptions-coupon.php:450 +#: includes/class-wc-subscriptions-coupon.php:462 msgid "Sorry, this coupon is only valid for new subscriptions." msgstr "" -#: includes/class-wc-subscriptions-coupon.php:455 +#: includes/class-wc-subscriptions-coupon.php:467 msgid "Sorry, this coupon is only valid for subscription products." msgstr "" -#: includes/class-wc-subscriptions-coupon.php:461 +#: includes/class-wc-subscriptions-coupon.php:473 #. translators: 1$: coupon code that is being removed msgid "Sorry, the \"%1$s\" coupon is only valid for renewals." msgstr "" -#: includes/class-wc-subscriptions-coupon.php:466 +#: includes/class-wc-subscriptions-coupon.php:478 msgid "" "Sorry, this coupon is only valid for subscription products with a sign-up " "fee." msgstr "" -#: includes/class-wc-subscriptions-coupon.php:492 +#: includes/class-wc-subscriptions-coupon.php:504 msgid "" "Sorry, recurring coupons can only be applied to subscriptions or " "subscription orders." msgstr "" -#: includes/class-wc-subscriptions-coupon.php:496 +#: includes/class-wc-subscriptions-coupon.php:508 #. translators: placeholder is coupon code msgid "" "Sorry, \"%s\" can only be applied to subscription parent orders which " "contain a product with signup fees." msgstr "" -#: includes/class-wc-subscriptions-coupon.php:499 +#: includes/class-wc-subscriptions-coupon.php:511 msgid "Sorry, only recurring coupons can be applied to subscriptions." msgstr "" -#: includes/class-wc-subscriptions-coupon.php:681 +#: includes/class-wc-subscriptions-coupon.php:693 msgid "Renewal % discount" msgstr "" -#: includes/class-wc-subscriptions-coupon.php:682 +#: includes/class-wc-subscriptions-coupon.php:694 msgid "Renewal product discount" msgstr "" -#: includes/class-wc-subscriptions-coupon.php:683 +#: includes/class-wc-subscriptions-coupon.php:695 msgid "Renewal cart discount" msgstr "" -#: includes/class-wc-subscriptions-coupon.php:684 +#: includes/class-wc-subscriptions-coupon.php:696 msgid "Initial payment discount" msgstr "" -#: includes/class-wc-subscriptions-coupon.php:701 +#: includes/class-wc-subscriptions-coupon.php:713 msgid "Renewal Discount" msgstr "" -#: includes/class-wc-subscriptions-coupon.php:704 +#: includes/class-wc-subscriptions-coupon.php:716 msgid "Discount" msgstr "" -#: includes/class-wc-subscriptions-coupon.php:920 +#: includes/class-wc-subscriptions-coupon.php:932 msgid "" "Sorry, it seems there are no available payment methods which support the " "recurring coupon you are using. Please contact us if you require assistance " "or wish to make alternate arrangements." msgstr "" -#: includes/class-wc-subscriptions-coupon.php:935 +#: includes/class-wc-subscriptions-coupon.php:947 msgid "Active for x payments" msgstr "" -#: includes/class-wc-subscriptions-coupon.php:936 +#: includes/class-wc-subscriptions-coupon.php:948 msgid "Unlimited payments" msgstr "" -#: includes/class-wc-subscriptions-coupon.php:937 +#: includes/class-wc-subscriptions-coupon.php:949 msgid "" "Coupon will be limited to the given number of payments. It will then be " "automatically removed from the subscription. \"Payments\" also includes the " "initial subscription payment." msgstr "" -#: includes/class-wc-subscriptions-coupon.php:1069 +#: includes/class-wc-subscriptions-coupon.php:1081 #. translators: %d refers to the number of payments the coupon can be used for. msgid "Active for %d payment" msgid_plural "Active for %d payments" msgstr[0] "" msgstr[1] "" -#: includes/class-wc-subscriptions-coupon.php:1073 +#: includes/class-wc-subscriptions-coupon.php:1085 msgid "Active for unlimited payments" msgstr "" @@ -2031,7 +2031,7 @@ msgid "Error: Unable to create renewal order with note \"%s\"" msgstr "" #: includes/class-wc-subscriptions-manager.php:168 -#: includes/gateways/class-wc-subscriptions-payment-gateways.php:211 +#: includes/gateways/class-wc-subscriptions-payment-gateways.php:209 msgid "Subscription doesn't exist in scheduled action: %d" msgstr "" @@ -2533,33 +2533,33 @@ msgid "Weekly" msgstr "" #: includes/class-wcs-cart-initial-payment.php:59 -#: includes/class-wcs-cart-renewal.php:188 +#: includes/class-wcs-cart-renewal.php:191 msgid "That doesn't appear to be your order." msgstr "" -#: includes/class-wcs-cart-renewal.php:204 +#: includes/class-wcs-cart-renewal.php:207 msgid "" "This order can no longer be paid because the corresponding subscription " "does not require payment at this time." msgstr "" -#: includes/class-wcs-cart-renewal.php:221 +#: includes/class-wcs-cart-renewal.php:224 msgid "Complete checkout to renew your subscription." msgstr "" -#: includes/class-wcs-cart-renewal.php:302 +#: includes/class-wcs-cart-renewal.php:305 #. translators: placeholder is an item name msgid "" "The %s product has been deleted and can no longer be renewed. Please choose " "a new product or contact us for assistance." msgstr "" -#: includes/class-wcs-cart-renewal.php:336 +#: includes/class-wcs-cart-renewal.php:339 #. translators: %s is subscription's number msgid "Subscription #%s has not been added to the cart." msgstr "" -#: includes/class-wcs-cart-renewal.php:371 +#: includes/class-wcs-cart-renewal.php:374 msgid "" "We couldn't find the original subscription for an item in your cart. The " "item was removed." @@ -2569,7 +2569,7 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: includes/class-wcs-cart-renewal.php:378 +#: includes/class-wcs-cart-renewal.php:381 msgid "" "We couldn't find the original renewal order for an item in your cart. The " "item was removed." @@ -2579,7 +2579,7 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: includes/class-wcs-cart-renewal.php:653 +#: includes/class-wcs-cart-renewal.php:648 msgid "All linked subscription items have been removed from the cart." msgstr "" @@ -2619,26 +2619,26 @@ msgstr "" msgid "Learn more" msgstr "" -#: includes/class-wcs-limiter.php:45 +#: includes/class-wcs-limiter.php:44 msgid "Limit subscription" msgstr "" -#: includes/class-wcs-limiter.php:47 +#: includes/class-wcs-limiter.php:46 #. translators: placeholders are opening and closing link tags msgid "" "Only allow a customer to have one subscription to this product. %sLearn " "more%s." msgstr "" -#: includes/class-wcs-limiter.php:49 +#: includes/class-wcs-limiter.php:48 msgid "Do not limit" msgstr "" -#: includes/class-wcs-limiter.php:50 +#: includes/class-wcs-limiter.php:49 msgid "Limit to one active subscription" msgstr "" -#: includes/class-wcs-limiter.php:51 +#: includes/class-wcs-limiter.php:50 msgid "Limit to one of any status" msgstr "" @@ -2698,31 +2698,31 @@ msgid "" "\"delete\". Updates are done on post meta directly." msgstr "" -#: includes/class-wcs-query.php:113 +#: includes/class-wcs-query.php:114 msgid "Subscriptions (page %d)" msgstr "" -#: includes/class-wcs-query.php:140 +#: includes/class-wcs-query.php:141 msgid "My Subscription" msgstr "" -#: includes/class-wcs-query.php:297 +#: includes/class-wcs-query.php:298 msgid "Endpoint for the My Account → Subscriptions page" msgstr "" -#: includes/class-wcs-query.php:305 +#: includes/class-wcs-query.php:306 msgid "View subscription" msgstr "" -#: includes/class-wcs-query.php:306 +#: includes/class-wcs-query.php:307 msgid "Endpoint for the My Account → View Subscription page" msgstr "" -#: includes/class-wcs-query.php:314 +#: includes/class-wcs-query.php:315 msgid "Subscription payment method" msgstr "" -#: includes/class-wcs-query.php:315 +#: includes/class-wcs-query.php:316 msgid "Endpoint for the My Account → Change Subscription Payment Method page" msgstr "" @@ -2761,13 +2761,13 @@ msgid "" "subscriptions with no payment method in common." msgstr "" -#: includes/class-wcs-staging.php:37 +#: includes/class-wcs-staging.php:38 msgid "" "Payment processing skipped - renewal order created on %sstaging site%s " "under staging site lock. Live site is at %s" msgstr "" -#: includes/class-wcs-staging.php:52 +#: includes/class-wcs-staging.php:53 msgid "staging" msgstr "" @@ -2876,23 +2876,23 @@ msgstr "" msgid "Complete checkout to renew now." msgstr "" -#: includes/early-renewal/class-wcs-cart-early-renewal.php:247 +#: includes/early-renewal/class-wcs-cart-early-renewal.php:248 #. translators: placeholder contains a link to the order's edit screen. msgid "Customer successfully renewed early with order %s." msgstr "" -#: includes/early-renewal/class-wcs-cart-early-renewal.php:250 +#: includes/early-renewal/class-wcs-cart-early-renewal.php:251 #. translators: placeholder contains a link to the order's edit screen. msgid "" "Failed to update subscription dates after customer renewed early with order " "%s." msgstr "" -#: includes/early-renewal/class-wcs-cart-early-renewal.php:338 +#: includes/early-renewal/class-wcs-cart-early-renewal.php:339 msgid "Order %s created to record early renewal." msgstr "" -#: includes/early-renewal/class-wcs-cart-early-renewal.php:393 +#: includes/early-renewal/class-wcs-cart-early-renewal.php:394 msgid "Cancel" msgstr "" @@ -3157,47 +3157,47 @@ msgid "" "alternate arrangements." msgstr "" -#: includes/gateways/class-wc-subscriptions-payment-gateways.php:268 +#: includes/gateways/class-wc-subscriptions-payment-gateways.php:266 msgid "Supported features:" msgstr "" -#: includes/gateways/class-wc-subscriptions-payment-gateways.php:271 +#: includes/gateways/class-wc-subscriptions-payment-gateways.php:269 msgid "Subscription features:" msgstr "" -#: includes/gateways/class-wc-subscriptions-payment-gateways.php:275 +#: includes/gateways/class-wc-subscriptions-payment-gateways.php:273 msgid "Change payment features:" msgstr "" -#: includes/gateways/paypal/class-wcs-paypal.php:213 +#: includes/gateways/paypal/class-wcs-paypal.php:220 msgid "Unable to find order for PayPal billing agreement." msgstr "" -#: includes/gateways/paypal/class-wcs-paypal.php:275 +#: includes/gateways/paypal/class-wcs-paypal.php:282 msgid "An error occurred, please try again or try an alternate form of payment." msgstr "" -#: includes/gateways/paypal/class-wcs-paypal.php:379 +#: includes/gateways/paypal/class-wcs-paypal.php:386 #. translators: placeholders are PayPal API error code and PayPal API error #. message msgid "PayPal API error: (%d) %s" msgstr "" -#: includes/gateways/paypal/class-wcs-paypal.php:384 +#: includes/gateways/paypal/class-wcs-paypal.php:391 #. translators: placeholder is PayPal transaction status message msgid "PayPal Transaction Held: %s" msgstr "" -#: includes/gateways/paypal/class-wcs-paypal.php:396 +#: includes/gateways/paypal/class-wcs-paypal.php:403 #. translators: placeholder is PayPal transaction status message msgid "PayPal payment declined: %s" msgstr "" -#: includes/gateways/paypal/class-wcs-paypal.php:400 +#: includes/gateways/paypal/class-wcs-paypal.php:407 msgid "PayPal payment approved (ID: %s)" msgstr "" -#: includes/gateways/paypal/class-wcs-paypal.php:453 +#: includes/gateways/paypal/class-wcs-paypal.php:460 msgid "" "Are you sure you want to change the payment method from PayPal standard?\n" "\n" @@ -3262,15 +3262,15 @@ msgstr "" msgid "Open a ticket" msgstr "" -#: includes/gateways/paypal/includes/admin/class-wcs-paypal-admin.php:269 +#: includes/gateways/paypal/includes/admin/class-wcs-paypal-admin.php:274 msgid "PayPal Subscription ID:" msgstr "" -#: includes/gateways/paypal/includes/admin/class-wcs-paypal-admin.php:296 +#: includes/gateways/paypal/includes/admin/class-wcs-paypal-admin.php:300 msgid "Enable PayPal Standard for Subscriptions" msgstr "" -#: includes/gateways/paypal/includes/admin/class-wcs-paypal-admin.php:304 +#: includes/gateways/paypal/includes/admin/class-wcs-paypal-admin.php:308 #. translators: Placeholders are the opening and closing link tags. msgid "" "Before enabling PayPal Standard for Subscriptions, please note, when using " @@ -3298,7 +3298,7 @@ msgstr "" msgid "expected clearing date %s" msgstr "" -#: includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-ipn-handler.php:114 +#: includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-ipn-handler.php:94 msgid "Billing agreement cancelled at PayPal." msgstr "" @@ -4950,47 +4950,47 @@ msgstr "" msgid "Would you like to add a payment method now?" msgstr "" -#: woocommerce-subscriptions.php:493 +#: woocommerce-subscriptions.php:495 msgid "" "A subscription renewal has been removed from your cart. Multiple " "subscriptions can not be purchased at the same time." msgstr "" -#: woocommerce-subscriptions.php:499 +#: woocommerce-subscriptions.php:501 msgid "" "A subscription has been removed from your cart. Due to payment gateway " "restrictions, different subscription products can not be purchased at the " "same time." msgstr "" -#: woocommerce-subscriptions.php:505 +#: woocommerce-subscriptions.php:507 msgid "" "A subscription has been removed from your cart. Products and subscriptions " "can not be purchased at the same time." msgstr "" -#: woocommerce-subscriptions.php:647 woocommerce-subscriptions.php:664 +#: woocommerce-subscriptions.php:649 woocommerce-subscriptions.php:666 #. translators: placeholder is a number, this is for the teens #. translators: placeholder is a number, numbers ending in 4-9, 0 msgid "%sth" msgstr "" -#: woocommerce-subscriptions.php:652 +#: woocommerce-subscriptions.php:654 #. translators: placeholder is a number, numbers ending in 1 msgid "%sst" msgstr "" -#: woocommerce-subscriptions.php:656 +#: woocommerce-subscriptions.php:658 #. translators: placeholder is a number, numbers ending in 2 msgid "%snd" msgstr "" -#: woocommerce-subscriptions.php:660 +#: woocommerce-subscriptions.php:662 #. translators: placeholder is a number, numbers ending in 3 msgid "%srd" msgstr "" -#: woocommerce-subscriptions.php:690 +#: woocommerce-subscriptions.php:692 #. translators: 1$-2$: opening and closing tags, 3$-4$: link tags, #. takes to woocommerce plugin on wp.org, 5$-6$: opening and closing link tags, #. leads to plugins.php in admin @@ -5000,7 +5000,7 @@ msgid "" "%5$sinstall & activate WooCommerce »%6$s" msgstr "" -#: woocommerce-subscriptions.php:693 +#: woocommerce-subscriptions.php:695 #. translators: 1$-2$: opening and closing tags, 3$: minimum supported #. WooCommerce version, 4$-5$: opening and closing link tags, leads to plugin #. admin @@ -5010,11 +5010,11 @@ msgid "" "WooCommerce to version %3$s or newer »%5$s" msgstr "" -#: woocommerce-subscriptions.php:724 +#: woocommerce-subscriptions.php:726 msgid "Variable Subscription" msgstr "" -#: woocommerce-subscriptions.php:820 +#: woocommerce-subscriptions.php:822 msgid "" "%1$sWarning!%2$s We can see the %1$sWooCommerce Subscriptions Early " "Renewal%2$s plugin is active. Version %3$s of %1$sWooCommerce " @@ -5023,11 +5023,11 @@ msgid "" "avoid any conflicts." msgstr "" -#: woocommerce-subscriptions.php:823 +#: woocommerce-subscriptions.php:825 msgid "Installed Plugins" msgstr "" -#: woocommerce-subscriptions.php:892 +#: woocommerce-subscriptions.php:894 #. translators: 1$-2$: opening and closing tags. 3$-4$: opening and #. closing link tags for learn more. Leads to duplicate site article on docs. #. 5$-6$: Opening and closing link to production URL. 7$: Production URL . @@ -5039,19 +5039,19 @@ msgid "" "the site's URL. %3$sLearn more »%4$s." msgstr "" -#: woocommerce-subscriptions.php:901 +#: woocommerce-subscriptions.php:903 msgid "Quit nagging me (but don't enable automatic payments)" msgstr "" -#: woocommerce-subscriptions.php:906 +#: woocommerce-subscriptions.php:908 msgid "Enable automatic payments" msgstr "" -#: woocommerce-subscriptions.php:1112 +#: woocommerce-subscriptions.php:1114 msgid "Support" msgstr "" -#: woocommerce-subscriptions.php:1195 +#: woocommerce-subscriptions.php:1197 #. translators: placeholders are opening and closing tags. Leads to docs on #. version 2 msgid "" @@ -5062,14 +5062,14 @@ msgid "" "2.0 »%s" msgstr "" -#: woocommerce-subscriptions.php:1210 +#: woocommerce-subscriptions.php:1212 msgid "" "Warning! You are running version %s of WooCommerce Subscriptions plugin " "code but your database has been upgraded to Subscriptions version 2.0. This " "will cause major problems on your store." msgstr "" -#: woocommerce-subscriptions.php:1211 +#: woocommerce-subscriptions.php:1213 msgid "" "Please upgrade the WooCommerce Subscriptions plugin to version 2.0 or newer " "immediately. If you need assistance, after upgrading to Subscriptions v2.0, " @@ -5183,12 +5183,12 @@ msgctxt "refers to live site" msgid "Live" msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:57 +#: includes/admin/class-wcs-admin-meta-boxes.php:59 msgctxt "meta box title" msgid "Subscription Data" msgstr "" -#: includes/admin/class-wcs-admin-meta-boxes.php:59 +#: includes/admin/class-wcs-admin-meta-boxes.php:61 msgctxt "meta box title" msgid "Schedule" msgstr "" @@ -5356,8 +5356,8 @@ msgstr "" #: includes/admin/meta-boxes/views/html-related-orders-row.php:19 #: includes/class-wc-subscriptions-renewal-order.php:157 -#: includes/early-renewal/class-wcs-cart-early-renewal.php:240 -#: includes/early-renewal/class-wcs-cart-early-renewal.php:337 +#: includes/early-renewal/class-wcs-cart-early-renewal.php:241 +#: includes/early-renewal/class-wcs-cart-early-renewal.php:338 #: templates/myaccount/my-subscriptions.php:38 #: templates/myaccount/related-orders.php:44 #: templates/myaccount/related-subscriptions.php:32 @@ -5367,7 +5367,7 @@ msgstr "" #: includes/class-wc-subscriptions-addresses.php:206 #: includes/class-wc-subscriptions-change-payment-gateway.php:776 -#: includes/class-wcs-query.php:109 +#: includes/class-wcs-query.php:110 msgctxt "hash before order number" msgid "Subscription #%s" msgstr "" @@ -5524,7 +5524,7 @@ msgid "Subscription renewal payment retry:" msgstr "" #: includes/early-renewal/class-wcs-cart-early-renewal.php:150 -#: includes/early-renewal/class-wcs-cart-early-renewal.php:197 +#: includes/early-renewal/class-wcs-cart-early-renewal.php:198 msgctxt "used in order note as reason for why subscription status changed" msgid "Customer requested to renew early:" msgstr "" @@ -5743,7 +5743,7 @@ msgctxt "input field placeholder for day field for annual subscriptions" msgid "Day" msgstr "" -#: includes/class-wcs-cart-renewal.php:682 +#: includes/class-wcs-cart-renewal.php:677 msgctxt "" "Used in WooCommerce by removed item notification: \"_All linked " "subscription items were_ removed. Undo?\" Filter for item title." @@ -5945,7 +5945,7 @@ msgctxt "default email subject for suspended emails sent to the admin" msgid "[%s] Subscription Suspended" msgstr "" -#: includes/gateways/paypal/class-wcs-paypal.php:355 +#: includes/gateways/paypal/class-wcs-paypal.php:362 #: includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-request.php:208 #: includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-request.php:315 #: includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-request.php:326 @@ -5960,7 +5960,7 @@ msgctxt "" msgid "#" msgstr "" -#: includes/gateways/paypal/class-wcs-paypal.php:619 +#: includes/gateways/paypal/class-wcs-paypal.php:626 msgctxt "" "used in User Agent data sent to PayPal to help identify where a payment " "came from" @@ -6088,7 +6088,7 @@ msgid "2.5" msgstr "" #: includes/upgrades/templates/wcs-about-2-0.php:36 -#: woocommerce-subscriptions.php:1111 +#: woocommerce-subscriptions.php:1113 msgctxt "short for documents" msgid "Docs" msgstr "" diff --git a/woocommerce-subscriptions.php b/woocommerce-subscriptions.php index bf71c9a..af4e0ec 100755 --- a/woocommerce-subscriptions.php +++ b/woocommerce-subscriptions.php @@ -5,10 +5,10 @@ * Description: Sell products and services with recurring payments in your WooCommerce Store. * Author: Prospress Inc. * Author URI: https://prospress.com/ - * Version: 2.5.3 + * Version: 2.5.6 * * WC requires at least: 3.0 - * WC tested up to: 3.5 + * WC tested up to: 3.6 * Woo: 27147:6115e6d7e297b623a169fdcf5728b224 * * Copyright 2017 Prospress, Inc. (email : freedoms@prospress.com) @@ -113,7 +113,7 @@ class WC_Subscriptions { public static $plugin_file = __FILE__; - public static $version = '2.5.3'; + public static $version = '2.5.6'; public static $wc_minimum_supported_version = '3.0'; @@ -484,7 +484,9 @@ class WC_Subscriptions { // If the product is sold individually or if the cart doesn't already contain this product, empty the cart. if ( ( $product && $product->is_sold_individually() ) || ! WC()->cart->find_product_in_cart( $cart_item_id ) ) { + $coupons = WC()->cart->get_applied_coupons(); WC()->cart->empty_cart(); + WC()->cart->set_applied_coupons( $coupons ); } } elseif ( $is_subscription && wcs_cart_contains_renewal() && ! $multiple_subscriptions_possible && ! $manual_renewals_enabled ) {