diff --git a/.wp-env.json b/.wp-env.json new file mode 100644 index 0000000..a4166b6 --- /dev/null +++ b/.wp-env.json @@ -0,0 +1,18 @@ +{ + "plugins": [ + "https://downloads.wordpress.org/plugin/woocommerce.zip", + "https://downloads.wordpress.org/plugin/email-log.zip", + ".", + "./tests/e2e/test-configuration-plugin" + ], + "themes": [ + "https://downloads.wordpress.org/theme/storefront.zip" + ], + "env": { + "tests": { + "mappings": { + "wp-cli.yml": "./tests/e2e/bin/wp-cli.yml" + } + } + } +} diff --git a/changelog.txt b/changelog.txt index edc6d51..1279a88 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,28 @@ -*** Woo Subscriptions Changelog *** +*** WooCommerce Subscriptions Changelog *** + +2024-05-09 - version 6.3.1 +* Fix: Resolved an issue that caused "WC_DateTime could not be converted to int" warnings to occur on non-hpos sites while editing a subscription. + +2024-05-09 - version 6.3.0 +* Fix: Uncaught exception from 'WCS_Related_Order_Store_Cached_CPT::delete_relations' when order is not an instance of WC_Order. +* Fix: Include subscription sign-up fees on orders created via the REST API. +* Fix: Add check to prevent fatal error in rsort and array_sum. +* Fix: Use `add_to_cart_ajax_redirect` instead of the deprecated `redirect_ajax_add_to_cart` function as callback. +* Fix: Filtered order links in subscription reports returns all the orders when HPOS is enabled. +* Fix: Typo in confirmation alert when users remove an item from a subscription. +* Fix: Ensure the scheduled sale price for subscription products ends at the end of the "to" day set in product settings. +* Fix: Subscription table is empty in mobile view when HPOS is enabled. +* Fix: WooCommerce page header is hidden when HPOS is enabled. +* Fix: Subscription updated messages missing on the Edit Subscription page when HPOS is enabled. +* Fix: Resolved an issue that prevented bulk actions from running on the Subscriptions list table when the table was filtered by date, payment method, product or customer. +* Fix: Subscriptions created via the POST `/wc/v3/orders/{order_id}/subscriptions` endpoint shouldn't include sign-up fees and/or $0 trial periods in line item totals. +* Update: Update the shipping method styling to apply borders to the highlighted shipping option in the Checkout block. +* Update: Include a full stack trace in failed scheduled action logs to improve troubleshooting issues. +* Update: Show notice about product being removed from the cart when a subscription is for disabled mixed checkout setting. +* Update: Change plugin name back to WooCommerce Subscriptions. +* Dev: Calling wcs_create_subscription() will no longer attempt to fetch a fresh instance of the subscription at the end. This is to prevent loading the subscription from the database potentially unnecessarily. +* Dev: Updated subscriptions-core to 7.1.0. +* Dev: Bump WooCommerce minimum required version to 7.9.0. 2024-04-11 - version 6.2.0 * Add: Declare WooCommerce as a plugin dependency in the plugin header. diff --git a/includes/admin/class-wcs-admin-reports.php b/includes/admin/class-wcs-admin-reports.php index b6b1b55..5413d26 100644 --- a/includes/admin/class-wcs-admin-reports.php +++ b/includes/admin/class-wcs-admin-reports.php @@ -55,7 +55,7 @@ class WCS_Admin_Reports { $admin_notice->set_html_content( sprintf( '

%s

%s

', - _x( 'Woo Subscriptions - Reports Not Available', 'heading used in an admin notice', 'woocommerce-subscriptions' ), + _x( 'WooCommerce Subscriptions - Reports Not Available', 'heading used in an admin notice', 'woocommerce-subscriptions' ), sprintf( // translators: placeholders $1 and $2 are opening tags linking to the WooCommerce documentation on HPOS and data synchronization. Placeholder $3 is a closing link () tag. __( 'Subscription reports are incompatible with the %1$sWooCommerce data storage features%3$s enabled on your store. Please enable %2$stable synchronization%3$s if you wish to use subscription reports.', 'woocommerce-subscriptions' ), diff --git a/includes/api/class-wc-rest-subscriptions-controller.php b/includes/api/class-wc-rest-subscriptions-controller.php index 97ca97c..57f6cad 100644 --- a/includes/api/class-wc-rest-subscriptions-controller.php +++ b/includes/api/class-wc-rest-subscriptions-controller.php @@ -624,6 +624,10 @@ class WC_REST_Subscriptions_Controller extends WC_REST_Orders_Controller { $subscription_item = $subscription->get_item( $item_id ); wcs_copy_order_item( $item, $subscription_item ); + + // Don't include sign-up fees or $0 trial periods when setting the subscriptions item totals. + $this->maybe_set_recurring_item_total( $subscription_item ); + $subscription_item->save(); // Check if this subscription will need shipping. @@ -684,8 +688,13 @@ class WC_REST_Subscriptions_Controller extends WC_REST_Orders_Controller { $subscription->add_item( $item ); } + + /* + * Fetch a fresh instance of the subscription because the current instance has an empty line item cache generated before we had copied the line items. + * Fetching a new instance will ensure the line items are used when calculating totals. + */ + $subscription = wcs_get_subscription( $subscription->get_id() ); $subscription->calculate_totals(); - $subscription->save(); /** * Fires after a single subscription is created or updated via the REST API. @@ -709,4 +718,41 @@ class WC_REST_Subscriptions_Controller extends WC_REST_Orders_Controller { return rest_ensure_response( $subscriptions ); } + + /** + * Set the subscription item total to its recurring product price. + * + * This function ensures that sign-up fees and/or $0 trial periods are not carried over from the initial order to the subscription. + * Note: If the line item has a custom total set by the merchant, don't override it with the recurring price. + * + * @param WC_Order_Item $item Subscription line item. + * + */ + private function maybe_set_recurring_item_total( &$item ) { + $product = $item->get_product(); + + if ( ! $product ) { + return; + } + + $sign_up_fee = WC_Subscriptions_Product::get_sign_up_fee( $product ); + $sign_up_fee = is_numeric( $sign_up_fee ) ? (float) $sign_up_fee : 0; + $trial_length = WC_Subscriptions_Product::get_trial_length( $product ); + + $recurring_price = (float) $product->get_price(); + $initial_price = $trial_length > 0 ? $sign_up_fee : $recurring_price + $sign_up_fee; + $initial_total = wc_get_price_excluding_tax( $product, [ 'qty' => $item->get_quantity(), 'price' => $initial_price ] ); + + // Check if a custom item total was set on the order. If so, don't override it. + if ( (float) $item->get_subtotal() !== $initial_total ) { + return; + } + + $recurring_total = wc_get_price_excluding_tax( $product, [ 'qty' => $item->get_quantity(), 'price' => $recurring_price ] ); + + $item->set_props( [ + 'subtotal' => $recurring_total, + 'total' => $recurring_total, + ] ); + } } diff --git a/includes/class-wc-subscriptions-dependency-manager.php b/includes/class-wc-subscriptions-dependency-manager.php index 5a706c9..7af2569 100644 --- a/includes/class-wc-subscriptions-dependency-manager.php +++ b/includes/class-wc-subscriptions-dependency-manager.php @@ -153,10 +153,10 @@ class WC_Subscriptions_Dependency_Manager { ); // 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 - $admin_notice_content = sprintf( esc_html__( '%1$sWoo Subscriptions is inactive.%2$s The %3$sWooCommerce plugin%4$s must be active for Woo Subscriptions to work. Please %5$sinstall & activate Woo »%6$s', 'woocommerce-subscriptions' ), '', '', '', '', '', '' ); + $admin_notice_content = sprintf( esc_html__( '%1$sWooCommerce Subscriptions is inactive.%2$s The %3$sWooCommerce plugin%4$s must be active for WooCommerce Subscriptions to work. Please %5$sinstall & activate WooCommerce »%6$s', 'woocommerce-subscriptions' ), '', '', '', '', '', '' ); } elseif ( ! $this->is_woocommerce_version_supported() ) { // translators: 1$-2$: opening and closing tags, 3$: minimum supported WooCommerce version, 4$-5$: opening and closing link tags, leads to plugin admin - $admin_notice_content = sprintf( esc_html__( '%1$sWoo Subscriptions is inactive.%2$s This version of Subscriptions requires WooCommerce %3$s or newer. Please %4$supdate WooCommerce to version %3$s or newer »%5$s', 'woocommerce-subscriptions' ), '', '', $this->minimum_supported_wc_version, '', '' ); + $admin_notice_content = sprintf( esc_html__( '%1$sWooCommerce Subscriptions is inactive.%2$s This version of Subscriptions requires WooCommerce %3$s or newer. Please %4$supdate WooCommerce to version %3$s or newer »%5$s', 'woocommerce-subscriptions' ), '', '', $this->minimum_supported_wc_version, '', '' ); } if ( $admin_notice_content ) { diff --git a/includes/class-wc-subscriptions-plugin.php b/includes/class-wc-subscriptions-plugin.php index fa932f0..3f8c68f 100644 --- a/includes/class-wc-subscriptions-plugin.php +++ b/includes/class-wc-subscriptions-plugin.php @@ -55,7 +55,7 @@ class WC_Subscriptions_Plugin extends WC_Subscriptions_Core_Plugin { $notice = new WCS_Admin_Notice( 'error' ); // translators: 1-2: opening/closing tags, 3: Subscriptions version. - $notice->set_simple_content( sprintf( __( '%1$sWarning!%2$s We can see the %1$sWooCommerce Subscriptions Early Renewal%2$s plugin is active. Version %3$s of %1$sWoo Subscriptions%2$s comes with that plugin\'s functionality packaged into the core plugin. Please deactivate WooCommerce Subscriptions Early Renewal to avoid any conflicts.', 'woocommerce-subscriptions' ), '', '', $this->get_plugin_version() ) ); // get_plugin_version() is used here to report the correct WCS version. + $notice->set_simple_content( sprintf( __( '%1$sWarning!%2$s We can see the %1$sWooCommerce Subscriptions Early Renewal%2$s plugin is active. Version %3$s of %1$sWooCommerce Subscriptions%2$s comes with that plugin\'s functionality packaged into the core plugin. Please deactivate WooCommerce Subscriptions Early Renewal to avoid any conflicts.', 'woocommerce-subscriptions' ), '', '', $this->get_plugin_version() ) ); // get_plugin_version() is used here to report the correct WCS version. $notice->set_actions( array( array( @@ -202,7 +202,7 @@ class WC_Subscriptions_Plugin extends WC_Subscriptions_Core_Plugin { sprintf( // translators: $1-$2: opening and closing tags, $3-$4: opening and closing tags. __( - '%1$sWoo Subscriptions Installed%2$s – %3$sYou\'re ready to start selling subscriptions!%4$s', + '%1$sWooCommerce Subscriptions Installed%2$s – %3$sYou\'re ready to start selling subscriptions!%4$s', 'woocommerce-subscriptions' ), '', diff --git a/includes/class-wcs-api.php b/includes/class-wcs-api.php index cd349cb..078a516 100644 --- a/includes/class-wcs-api.php +++ b/includes/class-wcs-api.php @@ -18,6 +18,7 @@ class WCS_API { add_filter( 'woocommerce_api_classes', array( __CLASS__, 'includes' ) ); add_action( 'rest_api_init', array( __CLASS__, 'register_routes' ), 15 ); add_action( 'rest_api_init', array( __CLASS__, 'register_route_overrides' ), 15 ); + add_action( 'woocommerce_rest_set_order_item', [ __CLASS__, 'add_sign_up_fee_to_order_item' ], 15, 2 ); } /** @@ -78,6 +79,39 @@ class WCS_API { new WC_REST_Subscriptions_Settings(); } + /** + * Adds sign-up fees to order items added/edited via the REST API. + * + * @since 6.3.0 + * + * @param WC_Order_Item $item Order item object. + */ + public static function add_sign_up_fee_to_order_item( $item ) { + if ( 'line_item' !== $item->get_type() || ! self::is_orders_api_request() ) { + return; + } + + $product = $item->get_product(); + $sign_up_fee = WC_Subscriptions_Product::get_sign_up_fee( $product ); + $sign_up_fee = is_numeric( $sign_up_fee ) ? (float) $sign_up_fee : 0; + + if ( 0 !== $sign_up_fee ) { + // Recalculate the totals as in `prepare_line_items`, but including the sign up fee in the price. + $trial_length = WC_Subscriptions_Product::get_trial_length( $product ); + + if ( $trial_length > 0 ) { + $price = $sign_up_fee; + } else { + $price = (float) $product->get_price() + $sign_up_fee; + } + + $total = wc_get_price_excluding_tax( $product, [ 'qty' => $item->get_quantity(), 'price' => $price ] ); + + $item->set_total( $total ); + $item->set_subtotal( $total ); + } + } + /** * Determines if a WP version compatible with REST API requests. * @@ -88,4 +122,19 @@ class WCS_API { global $wp_version; return version_compare( $wp_version, '4.4', '>=' ); } + + /** + * Determines if the current request is a REST API request for orders. + * + * @since 6.3.0 + * + * @return boolean + */ + protected static function is_orders_api_request() { + if ( ! defined( 'REST_REQUEST' ) || ! REST_REQUEST || empty( $GLOBALS['wp']->query_vars['rest_route'] ) ) { + return false; + } + + return (bool) preg_match( '/\/wc\/v[1-3]\/orders\b/', $GLOBALS['wp']->query_vars['rest_route'] ); + } } diff --git a/includes/class-wcs-upgrade-notice-manager.php b/includes/class-wcs-upgrade-notice-manager.php index 23601ab..3c307c8 100644 --- a/includes/class-wcs-upgrade-notice-manager.php +++ b/includes/class-wcs-upgrade-notice-manager.php @@ -102,7 +102,7 @@ class WCS_Upgrade_Notice_Manager { ); // translators: placeholder is Subscription version string ('3.1') - $notice->set_heading( sprintf( __( 'Welcome to Woo Subscriptions %s!', 'woocommerce-subscriptions' ), $version ) ); + $notice->set_heading( sprintf( __( 'Welcome to WooCommerce Subscriptions %s!', 'woocommerce-subscriptions' ), $version ) ); $notice->set_content_template( 'update-welcome-notice.php', WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory() . '/includes/upgrades/templates/', array( 'version' => $version, 'features' => $features, diff --git a/includes/switching/class-wc-subscriptions-switcher.php b/includes/switching/class-wc-subscriptions-switcher.php index e412ba7..2237dd0 100644 --- a/includes/switching/class-wc-subscriptions-switcher.php +++ b/includes/switching/class-wc-subscriptions-switcher.php @@ -782,6 +782,10 @@ class WC_Subscriptions_Switcher { $order = wc_get_order( $order_id ); + if ( ! $order instanceof WC_Order ) { + return; + } + // delete all the existing subscription switch links before adding new ones WCS_Related_Order_Store::instance()->delete_relations( $order, 'switch' ); diff --git a/languages/woocommerce-subscriptions.pot b/languages/woocommerce-subscriptions.pot index 975821a..4335a77 100644 --- a/languages/woocommerce-subscriptions.pot +++ b/languages/woocommerce-subscriptions.pot @@ -1,21 +1,22 @@ # Copyright (C) 2024 WooCommerce -# This file is distributed under the same license as the Woo Subscriptions plugin. +# This file is distributed under the same license as the WooCommerce Subscriptions plugin. msgid "" msgstr "" -"Project-Id-Version: Woo Subscriptions 6.2.0\n" +"Project-Id-Version: WooCommerce Subscriptions 6.3.1\n" "Report-Msgid-Bugs-To: https://woocommerce.com/contact-us\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-04-11T02:40:29+00:00\n" +"POT-Creation-Date: 2024-05-09T07:38:54+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"X-Generator: WP-CLI 2.9.0\n" +"X-Generator: WP-CLI 2.10.0\n" "X-Domain: woocommerce-subscriptions\n" #. Plugin Name of the plugin -msgid "Woo Subscriptions" +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:40 +msgid "WooCommerce Subscriptions" msgstr "" #. Plugin URI of the plugin @@ -38,7 +39,7 @@ msgstr "" #: includes/admin/class-wcs-admin-reports.php:58 msgctxt "heading used in an admin notice" -msgid "Woo Subscriptions - Reports Not Available" +msgid "WooCommerce Subscriptions - Reports Not Available" msgstr "" #. translators: placeholders $1 and $2 are opening tags linking to the WooCommerce documentation on HPOS and data synchronization. Placeholder $3 is a closing link () tag. @@ -53,7 +54,8 @@ msgstr "" #: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1182 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:59 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php:38 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php:80 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php:48 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php:90 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:372 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:385 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-query.php:108 @@ -97,14 +99,14 @@ msgid "Report Cache Enabled" msgstr "" #: includes/admin/reports/class-wcs-report-cache-manager.php:316 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1644 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1713 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1724 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1793 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:98 msgid "Yes" msgstr "" #: includes/admin/reports/class-wcs-report-cache-manager.php:316 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1644 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1724 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:98 msgid "No" msgstr "" @@ -1002,17 +1004,17 @@ msgstr "" #. 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 #: includes/class-wc-subscriptions-dependency-manager.php:156 -msgid "%1$sWoo Subscriptions is inactive.%2$s The %3$sWooCommerce plugin%4$s must be active for Woo Subscriptions to work. Please %5$sinstall & activate Woo »%6$s" +msgid "%1$sWooCommerce Subscriptions is inactive.%2$s The %3$sWooCommerce plugin%4$s must be active for WooCommerce Subscriptions to work. Please %5$sinstall & activate WooCommerce »%6$s" msgstr "" #. translators: 1$-2$: opening and closing tags, 3$: minimum supported WooCommerce version, 4$-5$: opening and closing link tags, leads to plugin admin #: includes/class-wc-subscriptions-dependency-manager.php:159 -msgid "%1$sWoo Subscriptions is inactive.%2$s This version of Subscriptions requires WooCommerce %3$s or newer. Please %4$supdate WooCommerce to version %3$s or newer »%5$s" +msgid "%1$sWooCommerce Subscriptions is inactive.%2$s This version of Subscriptions requires WooCommerce %3$s or newer. Please %4$supdate WooCommerce to version %3$s or newer »%5$s" msgstr "" #. translators: 1-2: opening/closing tags, 3: Subscriptions version. #: includes/class-wc-subscriptions-plugin.php:58 -msgid "%1$sWarning!%2$s We can see the %1$sWooCommerce Subscriptions Early Renewal%2$s plugin is active. Version %3$s of %1$sWoo Subscriptions%2$s comes with that plugin's functionality packaged into the core plugin. Please deactivate WooCommerce Subscriptions Early Renewal to avoid any conflicts." +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 Subscriptions%2$s comes with that plugin's functionality packaged into the core plugin. Please deactivate WooCommerce Subscriptions Early Renewal to avoid any conflicts." msgstr "" #: includes/class-wc-subscriptions-plugin.php:62 @@ -1021,7 +1023,7 @@ msgstr "" #. translators: $1-$2: opening and closing tags, $3-$4: opening and closing tags. #: includes/class-wc-subscriptions-plugin.php:204 -msgid "%1$sWoo Subscriptions Installed%2$s – %3$sYou're ready to start selling subscriptions!%4$s" +msgid "%1$sWooCommerce Subscriptions Installed%2$s – %3$sYou're ready to start selling subscriptions!%4$s" msgstr "" #: includes/class-wc-subscriptions-plugin.php:222 @@ -1091,7 +1093,7 @@ msgid "Set a maximum number of times a customer can suspend their account for ea msgstr "" #: includes/class-wcs-customer-suspension-manager.php:111 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1364 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1384 msgid "Suspend" msgstr "" @@ -1221,11 +1223,11 @@ msgstr "" #. translators: placeholder is Subscription version string ('3.1') #: includes/class-wcs-upgrade-notice-manager.php:105 -msgid "Welcome to Woo Subscriptions %s!" +msgid "Welcome to WooCommerce Subscriptions %s!" msgstr "" #: includes/class-wcs-upgrade-notice-manager.php:112 -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-failed-scheduled-action-manager.php:221 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-failed-scheduled-action-manager.php:232 msgid "Learn more" msgstr "" @@ -1645,7 +1647,7 @@ msgid "Choose a new subscription." msgstr "" #: includes/switching/class-wc-subscriptions-switcher.php:237 -#: includes/switching/class-wc-subscriptions-switcher.php:1240 +#: includes/switching/class-wc-subscriptions-switcher.php:1244 msgid "Your cart contained an invalid subscription switch request. It has been removed." msgid_plural "Your cart contained invalid subscription switch requests. They have been removed." msgstr[0] "" @@ -1756,7 +1758,7 @@ msgstr "" #: includes/switching/class-wc-subscriptions-switcher.php:448 #: includes/switching/class-wc-subscriptions-switcher.php:550 -#: includes/switching/class-wc-subscriptions-switcher.php:2679 +#: includes/switching/class-wc-subscriptions-switcher.php:2683 msgid "Upgrade or Downgrade" msgstr "" @@ -1775,88 +1777,88 @@ msgid "Between Grouped Subscriptions" msgstr "" #. translators: %s: order number. -#: includes/switching/class-wc-subscriptions-switcher.php:1149 +#: includes/switching/class-wc-subscriptions-switcher.php:1153 msgid "Switch order cancelled due to a new switch order being created #%s." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1368 +#: includes/switching/class-wc-subscriptions-switcher.php:1372 msgid "You can only switch to a subscription product." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1374 +#: includes/switching/class-wc-subscriptions-switcher.php:1378 msgid "We can not find your old subscription item." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1396 +#: includes/switching/class-wc-subscriptions-switcher.php:1400 msgid "You can not switch to the same subscription." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1443 +#: includes/switching/class-wc-subscriptions-switcher.php:1447 msgid "You can not switch this subscription. It appears you do not own the subscription." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1484 +#: includes/switching/class-wc-subscriptions-switcher.php:1488 msgid "There was an error locating the switch details." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1865 +#: includes/switching/class-wc-subscriptions-switcher.php:1869 msgctxt "a switch type" msgid "Downgrade" msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1868 +#: includes/switching/class-wc-subscriptions-switcher.php:1872 msgctxt "a switch type" msgid "Upgrade" msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1871 +#: includes/switching/class-wc-subscriptions-switcher.php:1875 msgctxt "a switch type" msgid "Crossgrade" msgstr "" #. translators: %1: product subtotal, %2: HTML span tag, %3: direction (upgrade, downgrade, crossgrade), %4: closing HTML span tag -#: includes/switching/class-wc-subscriptions-switcher.php:1876 +#: includes/switching/class-wc-subscriptions-switcher.php:1880 msgctxt "product subtotal string" msgid "%1$s %2$s(%3$s)%4$s" msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1992 +#: includes/switching/class-wc-subscriptions-switcher.php:1996 msgid "The original subscription item being switched cannot be found." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1994 +#: includes/switching/class-wc-subscriptions-switcher.php:1998 msgid "The item on the switch order cannot be found." msgstr "" #. translators: 1$: old item, 2$: new item when switching -#: includes/switching/class-wc-subscriptions-switcher.php:2005 +#: includes/switching/class-wc-subscriptions-switcher.php:2009 msgctxt "used in order notes" msgid "Customer switched from: %1$s to %2$s." msgstr "" #. translators: %s: new item name. -#: includes/switching/class-wc-subscriptions-switcher.php:2008 +#: includes/switching/class-wc-subscriptions-switcher.php:2012 msgctxt "used in order notes" msgid "Customer added %s." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:2403 -#: includes/switching/class-wc-subscriptions-switcher.php:2956 +#: includes/switching/class-wc-subscriptions-switcher.php:2407 +#: includes/switching/class-wc-subscriptions-switcher.php:2960 msgid "Switch Order" msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:2418 -#: includes/switching/class-wc-subscriptions-switcher.php:2971 +#: includes/switching/class-wc-subscriptions-switcher.php:2422 +#: includes/switching/class-wc-subscriptions-switcher.php:2975 msgid "Switched Subscription" msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:2636 +#: includes/switching/class-wc-subscriptions-switcher.php:2640 msgctxt "add to cart button text while switching a subscription" msgid "Switch subscription" msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:2820 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:224 +#: includes/switching/class-wc-subscriptions-switcher.php:2824 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:223 msgctxt "Subscription status" msgid "Switched" msgstr "" @@ -1887,75 +1889,115 @@ msgstr "" msgid "Want to renew early via the checkout? Click %shere.%s" msgstr "" +#: tests/unit/scheduler/scheduler.php:65 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:290 +msgctxt "table heading" +msgid "Start Date" +msgstr "" + +#: tests/unit/scheduler/scheduler.php:66 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:291 +msgctxt "table heading" +msgid "Trial End" +msgstr "" + +#: tests/unit/scheduler/scheduler.php:67 +#: vendor/woocommerce/subscriptions-core/templates/myaccount/my-subscriptions.php:40 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:292 +msgctxt "table heading" +msgid "Next Payment" +msgstr "" + +#: tests/unit/scheduler/scheduler.php:68 +#: vendor/woocommerce/subscriptions-core/templates/emails/cancelled-subscription.php:23 +#: vendor/woocommerce/subscriptions-core/templates/emails/expired-subscription.php:23 +#: vendor/woocommerce/subscriptions-core/templates/emails/on-hold-subscription.php:23 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:293 +msgctxt "table heading" +msgid "Last Order Date" +msgstr "" + +#: tests/unit/scheduler/scheduler.php:69 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:294 +msgctxt "table heading" +msgid "Cancelled Date" +msgstr "" + +#: tests/unit/scheduler/scheduler.php:70 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:295 +msgctxt "table heading" +msgid "End Date" +msgstr "" + #. translators: 1: relation type, 2: list of valid relation types. #: vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-related-order-store.php:148 msgid "Invalid relation type: %1$s. Order relationship type must be one of: %2$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:211 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:214 msgid "Simple subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:212 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:215 msgid "Variable subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:233 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:236 msgid "Downloadable" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:234 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:237 msgid "Virtual" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:298 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:301 msgid "Choose the subscription price, billing interval and period." msgstr "" #. translators: placeholder is trial period validation message if passed an invalid value (e.g. "Trial period can not exceed 4 weeks") -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:300 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:303 msgctxt "Trial period field tooltip on Edit Product administration screen" msgid "An optional period of time to wait before charging the first recurring payment. Any sign up fee will still be charged at the outset of the subscription. %s" msgstr "" #. translators: %s: currency symbol. #. translators: placeholder is a currency symbol / code -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:314 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:317 #: vendor/woocommerce/subscriptions-core/templates/admin/html-variation-price.php:44 msgid "Subscription price (%s)" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:318 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:321 msgctxt "example price" msgid "e.g. 5.90" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:319 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:322 msgid "Subscription interval" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:325 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:481 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:328 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:484 msgid "Subscription period" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:341 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:482 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:344 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:485 #: vendor/woocommerce/subscriptions-core/templates/admin/html-variation-price.php:66 msgid "Stop renewing after" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:344 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:347 msgid "Automatically stop renewing the subscription after this length of time. This length is in addition to any free trial or amount of time provided before a synchronised first renewal date." msgstr "" #. translators: %s is a currency symbol / code -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:355 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:358 #: vendor/woocommerce/subscriptions-core/templates/admin/html-variation-price.php:20 msgid "Sign-up fee (%s)" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:356 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:359 #: vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-price.php:31 #: vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-price.php:86 #: vendor/woocommerce/subscriptions-core/templates/admin/html-variation-price.php:21 @@ -1964,46 +2006,46 @@ msgctxt "example price" msgid "e.g. 9.90" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:357 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:360 msgid "Optionally include an amount to be charged at the outset of the subscription. The sign-up fee will be charged immediately, even if the product has a free trial or the payment dates are synced." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:371 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:374 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2422 #: vendor/woocommerce/subscriptions-core/templates/admin/html-variation-price.php:25 msgid "Free trial" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:374 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:377 #: vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-price.php:115 msgid "Subscription Trial Period" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:414 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:417 msgid "One time shipping" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:415 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:418 msgid "Shipping for subscription products is normally charged on the initial order and all renewal orders. Enable this to only charge shipping once on the initial order. Note: for this setting to be enabled the subscription must not have a free trial or a synced renewal date." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:478 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:481 msgid "Subscription pricing" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:479 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:482 msgid "Subscription sign-up fee" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:480 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:483 msgid "Subscription billing interval" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:483 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:486 msgid "Free trial length" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:484 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:487 msgid "Free trial period" msgstr "" @@ -2124,110 +2166,111 @@ msgstr "" #. translators: placeholder is a number #. translators: placeholder is a subscription ID. #: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1348 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1510 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1590 msgid "We can't find a subscription with ID #%d. Perhaps it was deleted?" msgstr "" #. translators: Placeholders are opening and closing link tags. -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1423 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1441 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1503 msgid "We weren't able to locate the set of report results you requested. Please regenerate the link from the %1$sSubscription Reports screen%2$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1478 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1558 msgid "We can't find a paid subscription order for this user." msgstr "" #. translators: placeholders are opening link tag, ID of sub, and closing link tag -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1517 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1597 msgid "Showing orders for %1$sSubscription %2$s%3$s" msgstr "" #. translators: number of 1$: days, 2$: weeks, 3$: months, 4$: years -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1540 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1620 msgid "The trial period can not exceed: %1$s, %2$s, %3$s or %4$s." msgstr "" #. translators: placeholder is a time period (e.g. "4 weeks") -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1545 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1625 msgid "The trial period can not exceed %s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1570 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1650 msgid "Please log in to your account to view your subscriptions." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1607 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1687 msgid "No subscriptions found for that customer." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1609 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1689 msgid "You do not have permission to view those subscriptions." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1643 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1723 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:96 msgctxt "label that indicates whether debugging is turned on for the plugin" msgid "WCS_DEBUG" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1649 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1729 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:110 msgctxt "Live or Staging, Label on WooCommerce -> System Status page" msgid "Subscriptions Mode" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1650 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1730 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:112 msgctxt "refers to staging site" msgid "Staging" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1650 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1730 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:112 msgctxt "refers to live site" msgid "Live" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1680 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1760 msgid "Automatic Recurring Payments" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1713 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1793 msgid "Supports automatic renewal payments." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1811 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1891 msgid "Subscription items can no longer be edited." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1815 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1895 msgid "This subscription is no longer editable because the payment gateway does not allow modification of recurring amounts." msgstr "" #. translators: $1-2: opening and closing tags of a link that takes to Woo marketplace / Stripe product page -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1834 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1914 msgid "No payment gateways capable of processing automatic subscription payments are enabled. If you would like to process automatic payments, we recommend the %1$sfree Stripe extension%2$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1841 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1921 msgid "Recurring Payments" msgstr "" #. translators: placeholders are opening and closing link tags -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1849 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1929 msgid "Payment gateways which don't support automatic recurring payments can be used to process %1$smanual subscription renewal payments%2$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1969 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:2049 msgid "Note that purchasing a subscription still requires an account." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1983 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:2063 msgid "The product type can not be changed because this product is associated with subscriptions." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:2040 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:2041 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:2120 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:2121 msgid "Allow subscription customers to create an account during checkout" msgstr "" @@ -2333,41 +2376,41 @@ msgstr "" msgid "Lock manual price increases" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:234 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:239 msgid "Search for a product…" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:297 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:328 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:303 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:334 msgctxt "an action on a subscription" msgid "Move to Trash" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:306 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:312 msgctxt "an action on a subscription" msgid "Restore" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:307 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:313 msgctxt "an action on a subscription" msgid "Delete Permanently" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:325 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1752 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:331 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1772 msgctxt "an action on a subscription" msgid "Activate" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:326 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1753 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:332 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1773 msgctxt "an action on a subscription" msgid "Put on-hold" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:327 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1365 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1754 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:333 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1385 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1774 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1955 #: vendor/woocommerce/subscriptions-core/includes/wcs-user-functions.php:329 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:78 @@ -2376,20 +2419,20 @@ msgid "Cancel" msgstr "" #. translators: placeholder is the number of subscriptions updated -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:415 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:421 msgid "%s subscription status changed." msgid_plural "%s subscription statuses changed." msgstr[0] "" msgstr[1] "" #. translators: 1$: is the number of subscriptions not updated, 2$: is the error message -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:434 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:440 msgid "%1$s subscription could not be updated: %2$s" msgid_plural "%1$s subscriptions could not be updated: %2$s" msgstr[0] "" msgstr[1] "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:462 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:468 #: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:21 #: vendor/woocommerce/subscriptions-core/templates/myaccount/my-subscriptions.php:22 #: vendor/woocommerce/subscriptions-core/templates/myaccount/my-subscriptions.php:37 @@ -2401,7 +2444,7 @@ msgstr[1] "" msgid "Status" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:463 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:469 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:373 #: vendor/woocommerce/subscriptions-core/templates/emails/cancelled-subscription.php:21 #: vendor/woocommerce/subscriptions-core/templates/emails/expired-subscription.php:21 @@ -2411,79 +2454,79 @@ msgstr "" msgid "Subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:464 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:470 msgid "Items" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:465 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:471 #: vendor/woocommerce/subscriptions-core/build/index.js:11 #: vendor/woocommerce/subscriptions-core/build/index.js:17 msgid "Total" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:466 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:472 msgid "Start Date" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:467 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:473 msgid "Trial End" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:468 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:474 msgid "Next Payment" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:469 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:475 msgid "Last Order Date" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:470 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:476 msgid "End Date" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:471 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:477 msgctxt "number of orders linked to a subscription" msgid "Orders" msgstr "" #. translators: placeholder is a subscription ID. -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:506 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:512 msgctxt "hash before subscription number" msgid "#%s" msgstr "" #. translators: Placeholder is a
HTML tag. -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:518 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:524 msgid "This subscription couldn't be loaded from the database. %s Click to learn more." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:556 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:562 msgctxt "meaning billing address" msgid "Billing:" msgstr "" #. translators: placeholder is customer's billing email -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:561 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:567 msgid "Email: %s" msgstr "" #. translators: placeholder is customer's billing phone number -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:566 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:572 msgid "Tel: %s" msgstr "" #. translators: $1: is opening link, $2: is subscription order number, $3: is closing link tag, $4: is user's name -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:596 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:603 msgctxt "Subscription title on admin table. (e.g.: #211 for John Doe)" msgid "%1$s#%2$s%3$s for %4$s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:605 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:612 msgid "Show more details" msgstr "" #. translators: %d: item count. -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:626 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:633 msgid "%d item" msgid_plural "%d items" msgstr[0] "" @@ -2491,131 +2534,131 @@ msgstr[1] "" #. translators: placeholder is the display name of a payment gateway a subscription was paid by #. translators: %s: payment method. -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:645 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:652 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2147 msgid "Via %s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:688 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:695 msgid "Y/m/d g:i:s A" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:705 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:712 msgid "Subscription payment overdue.
" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:710 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:717 msgid "This date should be treated as an estimate only. The payment gateway for this subscription controls when payments are processed.
" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1099 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1102 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1105 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1113 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1116 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1119 msgid "Subscription updated." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1100 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1114 msgid "Custom field updated." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1101 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1115 msgid "Custom field deleted." msgstr "" #. translators: placeholder is previous post title -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1104 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1118 msgctxt "used in post updated messages" msgid "Subscription restored to revision from %s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1106 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1120 msgid "Subscription saved." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1107 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1121 msgid "Subscription submitted." msgstr "" #. translators: php date string -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1109 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1123 msgid "Subscription scheduled for: %1$s." msgstr "" #. translators: php date string -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1109 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1123 msgctxt "used in \"Subscription scheduled for \"" msgid "M j, Y @ G:i" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1110 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1124 msgid "Subscription draft updated." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1152 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1167 msgid "Any Payment Method" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1153 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1168 msgid "None" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1159 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1174 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2129 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-change-payment-method-admin.php:170 msgid "Manual Renewal" msgstr "" #. translators: 1: user display name 2: user ID 3: user email -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1318 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1338 msgid "%1$s (#%2$s – %3$s)" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1325 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1345 #: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:96 msgid "Search for a customer…" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1363 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1383 #: vendor/woocommerce/subscriptions-core/includes/wcs-user-functions.php:311 msgid "Reactivate" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1366 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1386 msgid "Trash" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1367 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1387 msgid "Delete Permanently" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1386 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1406 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-product.php:768 msgid "Restore this item from the Trash" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1388 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1408 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-product.php:769 msgid "Restore" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1393 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1413 msgid "Move this item to the Trash" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1407 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1427 msgid "Delete this item permanently" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1418 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1438 msgid "Cancel Now" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1484 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1504 msgctxt "Used in order note. Reason why status changed." msgid "Subscription status changed by bulk edit:" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1602 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1622 msgid "All" msgstr "" @@ -2706,11 +2749,11 @@ msgctxt "label for the system status page" msgid "Country / State" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php:49 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php:59 msgid "Add New" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php:59 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php:69 msgid "Edit Subscription" msgstr "" @@ -2883,7 +2926,7 @@ msgstr "" #: vendor/woocommerce/subscriptions-core/templates/myaccount/my-subscriptions.php:24 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:25 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-subscriptions.php:24 -#: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php:22 +#: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php:21 msgctxt "table heading" msgid "Total" msgstr "" @@ -3000,7 +3043,7 @@ msgid "The \"all\" value for $order_type parameter is deprecated. It was a misno msgstr "" #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2226 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:835 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:834 msgid "Payment method meta must be an array." msgstr "" @@ -3081,23 +3124,31 @@ msgctxt "change billing or shipping address" msgid "Change %s address" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php:56 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php:50 +msgid "A subscription has been removed from your cart. Only one subscription product can be purchased at a time." +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php:50 +msgid "Products have been removed from your cart. Products and subscriptions can not be purchased at the same time." +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php:58 msgid "A subscription renewal has been removed from your cart. Multiple subscriptions can not be purchased at the same time." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php:62 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php:64 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 "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php:68 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php:70 msgid "A subscription has been removed from your cart. Products and subscriptions can not be purchased at the same time." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php:107 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php:109 msgid "Your cart has been emptied of subscription products. Only one subscription product can be purchased at a time." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php:128 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php:130 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:1482 msgid "That subscription product can not be added to your cart as it already contains a subscription renewal." msgstr "" @@ -3727,25 +3778,25 @@ msgid "The related subscription #%s has been deleted after the customer was dele msgstr "" #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1164 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:221 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:220 msgctxt "Subscription status" msgid "Active" msgstr "" #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1167 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:223 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:222 msgctxt "Subscription status" msgid "Cancelled" msgstr "" #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1170 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:225 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:224 msgctxt "Subscription status" msgid "Expired" msgstr "" #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1173 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:220 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:219 msgctxt "Subscription status" msgid "Pending" msgstr "" @@ -4183,7 +4234,7 @@ msgstr "" msgid "Admin turned on automatic renewals by changing payment method to \"%s\" via the Edit Subscription screen." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-failed-scheduled-action-manager.php:216 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-failed-scheduled-action-manager.php:227 msgid "Ignore this error" msgstr "" @@ -5110,12 +5161,12 @@ msgid "Browser User Agent" msgstr "" #: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy-exporters.php:83 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:272 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:271 msgid "Billing Address" msgstr "" #: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy-exporters.php:84 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:271 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:270 msgid "Shipping Address" msgstr "" @@ -5127,10 +5178,6 @@ msgstr "" msgid "Email Address" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:40 -msgid "WooCommerce Subscriptions" -msgstr "" - #: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:43 #: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:44 msgid "Subscriptions Data" @@ -5375,7 +5422,7 @@ msgstr "" msgid "The new interface is also built on the existing %sEdit Order%s screen. If you've ever modified an order, you already know how to modify a subscription." msgstr "" -#. translators: placeholers are link tags: 1$-2$ new subscription page, 3$-4$: docs on woocommerce.com +#. translators: placeholders are link tags: 1$-2$ new subscription page, 3$-4$: docs on woocommerce.com #: vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-about-2-0.php:76 msgid "%1$sAdd a subscription%2$s now or %3$slearn more%4$s about the new interface." msgstr "" @@ -6247,7 +6294,7 @@ msgstr "" #: vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php:19 #: vendor/woocommerce/subscriptions-core/templates/emails/email-order-details.php:36 -#: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php:21 +#: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php:20 msgctxt "table headings in notification email" msgid "Product" msgstr "" @@ -6367,14 +6414,6 @@ msgctxt "table headings in notification email" msgid "Price" msgstr "" -#: vendor/woocommerce/subscriptions-core/templates/emails/cancelled-subscription.php:23 -#: vendor/woocommerce/subscriptions-core/templates/emails/expired-subscription.php:23 -#: vendor/woocommerce/subscriptions-core/templates/emails/on-hold-subscription.php:23 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:294 -msgctxt "table heading" -msgid "Last Order Date" -msgstr "" - #: vendor/woocommerce/subscriptions-core/templates/emails/cancelled-subscription.php:24 msgctxt "table headings in notification email" msgid "End of Prepaid Term" @@ -6657,12 +6696,6 @@ msgstr "" msgid "ID" msgstr "" -#: vendor/woocommerce/subscriptions-core/templates/myaccount/my-subscriptions.php:40 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:293 -msgctxt "table heading" -msgid "Next Payment" -msgstr "" - #: vendor/woocommerce/subscriptions-core/templates/myaccount/my-subscriptions.php:46 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:53 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-subscriptions.php:42 @@ -6779,8 +6812,8 @@ msgctxt "date on subscription updates list. Will be localized" msgid "l jS \\o\\f F Y, h:ia" msgstr "" -#: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php:35 -msgid "Are you sure you want remove this item from your subscription?" +#: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php:34 +msgid "Are you sure you want to remove this item from your subscription?" msgstr "" #: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals.php:23 @@ -6824,49 +6857,29 @@ msgctxt "Error message while creating a subscription" msgid "Invalid subscription customer_id." msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:222 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:221 msgctxt "Subscription status" msgid "On hold" msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:226 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:225 msgctxt "Subscription status" msgid "Pending Cancellation" msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:242 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:241 msgid "Can not get status name. Status is not a string." msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:265 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:264 msgid "Can not get address type display name. Address type is not a string." msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:291 -msgctxt "table heading" -msgid "Start Date" -msgstr "" - -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:292 -msgctxt "table heading" -msgid "Trial End" -msgstr "" - -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:295 -msgctxt "table heading" -msgid "Cancelled Date" -msgstr "" - -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:296 -msgctxt "table heading" -msgid "End Date" -msgstr "" - -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:331 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:330 msgid "Date type is not a string." msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:333 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:332 msgid "Date type can not be an empty string." msgstr "" @@ -6957,7 +6970,7 @@ msgstr "" msgid "Total due today" msgstr "" -#. translators: the word used to describe billing frequency, e.g. "fo1" 1 day or "for" 1 month. +#. translators: the word used to describe billing frequency, e.g. "for" 1 day or "for" 1 month. #: vendor/woocommerce/subscriptions-core/build/index.js:18 msgid "for 1" msgstr "" diff --git a/vendor/autoload.php b/vendor/autoload.php index aaaf88e..f0cec1b 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -2,24 +2,6 @@ // autoload.php @generated by Composer -if (PHP_VERSION_ID < 50600) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, $err); - } elseif (!headers_sent()) { - echo $err; - } - } - trigger_error( - $err, - E_USER_ERROR - ); -} - require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit270a670e4e35541a06419730c5cc18f6::getLoader(); +return ComposerAutoloaderInit8fb769e2bbbe11bb0307f5ba9e6722ef::getLoader(); diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index a72151c..afef3fa 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -42,9 +42,6 @@ namespace Composer\Autoload; */ class ClassLoader { - /** @var \Closure(string):void */ - private static $includeFile; - /** @var ?string */ private $vendorDir; @@ -109,7 +106,6 @@ class ClassLoader public function __construct($vendorDir = null) { $this->vendorDir = $vendorDir; - self::initializeIncludeClosure(); } /** @@ -429,8 +425,7 @@ class ClassLoader public function loadClass($class) { if ($file = $this->findFile($class)) { - $includeFile = self::$includeFile; - $includeFile($file); + includeFile($file); return true; } @@ -560,26 +555,18 @@ class ClassLoader return false; } - - /** - * @return void - */ - private static function initializeIncludeClosure() - { - if (self::$includeFile !== null) { - return; - } - - /** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - */ - self::$includeFile = \Closure::bind(static function($file) { - include $file; - }, null, null); - } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + * @private + */ +function includeFile($file) +{ + include $file; } diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index 51e734a..41bc143 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -28,7 +28,7 @@ class InstalledVersions { /** * @var mixed[]|null - * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null + * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null */ private static $installed; @@ -39,7 +39,7 @@ class InstalledVersions /** * @var array[] - * @psalm-var array}> + * @psalm-var array}> */ private static $installedByVendor = array(); @@ -98,7 +98,7 @@ class InstalledVersions { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; + return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); } } @@ -119,7 +119,7 @@ class InstalledVersions */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { - $constraint = $parser->parseConstraints((string) $constraint); + $constraint = $parser->parseConstraints($constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); @@ -243,7 +243,7 @@ class InstalledVersions /** * @return array - * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} */ public static function getRootPackage() { @@ -257,7 +257,7 @@ class InstalledVersions * * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @return array[] - * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} + * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} */ public static function getRawData() { @@ -280,7 +280,7 @@ class InstalledVersions * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ public static function getAllRawData() { @@ -303,7 +303,7 @@ class InstalledVersions * @param array[] $data A vendor/composer/installed.php data set * @return void * - * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data + * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data */ public static function reload($data) { @@ -313,7 +313,7 @@ class InstalledVersions /** * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ private static function getInstalled() { @@ -328,9 +328,7 @@ class InstalledVersions if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ - $required = require $vendorDir.'/composer/installed.php'; - $installed[] = self::$installedByVendor[$vendorDir] = $required; + $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { self::$installed = $installed[count($installed) - 1]; } @@ -342,17 +340,12 @@ class InstalledVersions // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ - $required = require __DIR__ . '/installed.php'; - self::$installed = $required; + self::$installed = require __DIR__ . '/installed.php'; } else { self::$installed = array(); } } - - if (self::$installed !== array()) { - $installed[] = self::$installed; - } + $installed[] = self::$installed; return $installed; } diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index b8cba3a..4e9166b 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit270a670e4e35541a06419730c5cc18f6 +class ComposerAutoloaderInit8fb769e2bbbe11bb0307f5ba9e6722ef { private static $loader; @@ -24,12 +24,12 @@ class ComposerAutoloaderInit270a670e4e35541a06419730c5cc18f6 require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInit270a670e4e35541a06419730c5cc18f6', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit8fb769e2bbbe11bb0307f5ba9e6722ef', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit270a670e4e35541a06419730c5cc18f6', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit8fb769e2bbbe11bb0307f5ba9e6722ef', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit270a670e4e35541a06419730c5cc18f6::getInitializer($loader)); + \Composer\Autoload\ComposerStaticInit8fb769e2bbbe11bb0307f5ba9e6722ef::getInitializer($loader)(); $loader->register(true); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index f3eec5c..5f455a7 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit270a670e4e35541a06419730c5cc18f6 +class ComposerStaticInit8fb769e2bbbe11bb0307f5ba9e6722ef { public static $prefixLengthsPsr4 = array ( 'C' => @@ -129,9 +129,9 @@ class ComposerStaticInit270a670e4e35541a06419730c5cc18f6 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit270a670e4e35541a06419730c5cc18f6::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit270a670e4e35541a06419730c5cc18f6::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit270a670e4e35541a06419730c5cc18f6::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit8fb769e2bbbe11bb0307f5ba9e6722ef::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit8fb769e2bbbe11bb0307f5ba9e6722ef::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit8fb769e2bbbe11bb0307f5ba9e6722ef::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 8612194..c768227 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -156,17 +156,17 @@ }, { "name": "woocommerce/subscriptions-core", - "version": "7.0.0", - "version_normalized": "7.0.0.0", + "version": "7.1.1", + "version_normalized": "7.1.1.0", "source": { "type": "git", "url": "https://github.com/Automattic/woocommerce-subscriptions-core.git", - "reference": "80a6cff950b4d43932382ebda2bad801b35af229" + "reference": "5ba92addca2996576d39376907157243b061175e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/80a6cff950b4d43932382ebda2bad801b35af229", - "reference": "80a6cff950b4d43932382ebda2bad801b35af229", + "url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/5ba92addca2996576d39376907157243b061175e", + "reference": "5ba92addca2996576d39376907157243b061175e", "shasum": "" }, "require": { @@ -179,7 +179,7 @@ "woocommerce/woocommerce-sniffs": "0.1.0", "yoast/phpunit-polyfills": "1.1.0" }, - "time": "2024-04-11T01:44:20+00:00", + "time": "2024-05-09T07:21:43+00:00", "type": "wordpress-plugin", "extra": { "phpcodesniffer-search-depth": 2 @@ -209,7 +209,7 @@ "description": "Sell products and services with recurring payments in your WooCommerce Store.", "homepage": "https://github.com/Automattic/woocommerce-subscriptions-core", "support": { - "source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/7.0.0", + "source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/7.1.1", "issues": "https://github.com/Automattic/woocommerce-subscriptions-core/issues" }, "install-path": "../woocommerce/subscriptions-core" diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index d13a40c..0967952 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,22 +1,22 @@ array( - 'name' => 'woocommerce/woocommerce-subscriptions', - 'pretty_version' => 'dev-release/6.2.0', - 'version' => 'dev-release/6.2.0', - 'reference' => '6c5d3d921f40709889b3f583726869f2fa95877f', + 'pretty_version' => 'dev-release/6.3.1', + 'version' => 'dev-release/6.3.1', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), + 'reference' => 'b5a7272b9b055ce77d66fde677421f816ed0e83d', + 'name' => 'woocommerce/woocommerce-subscriptions', 'dev' => false, ), 'versions' => array( 'composer/installers' => array( 'pretty_version' => 'v1.12.0', 'version' => '1.12.0.0', - 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/./installers', 'aliases' => array(), + 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', 'dev_requirement' => false, ), 'roundcube/plugin-installer' => array( @@ -32,21 +32,21 @@ ), ), 'woocommerce/subscriptions-core' => array( - 'pretty_version' => '7.0.0', - 'version' => '7.0.0.0', - 'reference' => '80a6cff950b4d43932382ebda2bad801b35af229', + 'pretty_version' => '7.1.1', + 'version' => '7.1.1.0', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../woocommerce/subscriptions-core', 'aliases' => array(), + 'reference' => '5ba92addca2996576d39376907157243b061175e', 'dev_requirement' => false, ), 'woocommerce/woocommerce-subscriptions' => array( - 'pretty_version' => 'dev-release/6.2.0', - 'version' => 'dev-release/6.2.0', - 'reference' => '6c5d3d921f40709889b3f583726869f2fa95877f', + 'pretty_version' => 'dev-release/6.3.1', + 'version' => 'dev-release/6.3.1', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), + 'reference' => 'b5a7272b9b055ce77d66fde677421f816ed0e83d', 'dev_requirement' => false, ), ), diff --git a/vendor/woocommerce/subscriptions-core/assets/js/admin/jstz.js b/vendor/woocommerce/subscriptions-core/assets/js/admin/jstz.js index 15e72e7..655f9a8 100644 --- a/vendor/woocommerce/subscriptions-core/assets/js/admin/jstz.js +++ b/vendor/woocommerce/subscriptions-core/assets/js/admin/jstz.js @@ -46,7 +46,7 @@ var jstz = (function () { 'Australia/Sydney': ['Australia/Lord_Howe'], 'Asia/Tokyo': ['Asia/Yakutsk'], 'Asia/Dhaka': ['Asia/Omsk'], - // In the real world Yerevan is not ambigous for Baku... but Windows. + // In the real world Yerevan is not ambiguous for Baku... but Windows. 'Asia/Baku': ['Asia/Yerevan'], 'Australia/Brisbane': ['Asia/Vladivostok'], 'Pacific/Noumea': ['Asia/Vladivostok'], @@ -332,7 +332,7 @@ var jstz = (function () { * Builds up the current timezones DST rules for the years defined * in the jstz.olson.dst_rules.years array. * - * If there are no DST occurences for those years, immediately returns + * If there are no DST occurrences for those years, immediately returns * the preliminary timezone. Otherwise proceeds and tries to solve * ambiguities. * diff --git a/vendor/woocommerce/subscriptions-core/build/index.asset.php b/vendor/woocommerce/subscriptions-core/build/index.asset.php index c49d2a1..64a433c 100644 --- a/vendor/woocommerce/subscriptions-core/build/index.asset.php +++ b/vendor/woocommerce/subscriptions-core/build/index.asset.php @@ -1 +1 @@ - array('wc-blocks-checkout', 'wc-price-format', 'wc-settings', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'b439c53b9fc89572bb98cb7ea362b3e0'); \ No newline at end of file + array('wc-blocks-checkout', 'wc-price-format', 'wc-settings', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'b74144542a686437daa06d7e57f2567f'); \ No newline at end of file diff --git a/vendor/woocommerce/subscriptions-core/build/index.js b/vendor/woocommerce/subscriptions-core/build/index.js index ac1b089..99bcdc3 100644 --- a/vendor/woocommerce/subscriptions-core/build/index.js +++ b/vendor/woocommerce/subscriptions-core/build/index.js @@ -14,7 +14,7 @@ Object(l.__)("Recurring total every 2nd %1$s","woocommerce-subscriptions"),n);ca /* Translators: %1$s is week, month, year */ Object(l.__)("Recurring total every 3rd %1$s","woocommerce-subscriptions"),n);default:return Object(l.sprintf)( /* Translators: %1$d is number of weeks, months, days, years. %2$s is week, month, year */ -Object(l.__)("Recurring total every %1$dth %2$s","woocommerce-subscriptions"),t,n)}}({billingInterval:n,billingPeriod:c});return Object(r.createElement)(i.TotalsItem,{className:"wcs-recurring-totals-panel__title",currency:t,label:u,value:a,description:Object(r.createElement)(f,{nextPaymentDate:o,subscriptionLength:s,billingInterval:n,billingPeriod:c})})},j=function(e){var t,n,c,o=e.subscription,s=e.needsShipping,u=e.calculatedShipping,p=o.totals,b=o.billing_interval,m=o.billing_period,f=o.next_payment_date,j=o.subscription_length,w=o.shipping_rates;if(!f)return null;var v=null==w||null===(t=w[0])||void 0===t||null===(n=t.shipping_rates)||void 0===n||null===(c=n.find((function(e){return e.selected})))||void 0===c?void 0:c.name,y=Object(a.getCurrencyFromPriceResponse)(p);return Object(r.createElement)("div",{className:"wcs-recurring-totals-panel"},Object(r.createElement)(O,{billingInterval:b,billingPeriod:m,nextPaymentDate:f,subscriptionLength:j,totals:parseInt(p.total_price,10),currency:y}),Object(r.createElement)(i.Panel,{className:"wcs-recurring-totals-panel__details",initialOpen:!1,title:Object(l.__)("Details","woocommerce-subscriptions")},Object(r.createElement)(i.TotalsWrapper,null,Object(r.createElement)(i.Subtotal,{currency:y,values:p}),Object(r.createElement)(d,{currency:y,values:p})),Object(r.createElement)(i.TotalsWrapper,null,Object(r.createElement)(_,{currency:y,needsShipping:s,calculatedShipping:u,values:p,selectedRate:v})),!g&&Object(r.createElement)(i.TotalsWrapper,null,Object(r.createElement)(i.TotalsTaxes,{currency:y,values:p})),Object(r.createElement)(i.TotalsWrapper,null,Object(r.createElement)(i.TotalsItem,{className:"wcs-recurring-totals-panel__details-total",currency:y,label:Object(l.__)("Total","woocommerce-subscriptions"),value:parseInt(p.total_price,10)}))))},w=function(e){var t=e.extensions,n=e.cart,c=t.subscriptions,i=n.cartNeedsShipping,o=n.cartHasCalculatedShipping;return c&&0!==c.length?c.map((function(e){var t=e.key,n=s()(e,["key"]);return Object(r.createElement)(j,{subscription:n,needsShipping:i,calculatedShipping:o,key:t})})):null},v=function(e){var t=e.extensions,n=e.collapsible,c=e.collapse,i=e.showItems,o=e.noResultsMessage,l=e.renderOption,a=e.components,u=t.subscriptions,p=void 0===u?[]:u,b=a.ShippingRatesControlPackage,m=Object(r.useMemo)((function(){return Object.values(p).map((function(e){return e.shipping_rates})).filter(Boolean).flat()}),[p]),g=Object(r.useMemo)((function(){return 1
', + '' + ) + ); + $admin_notice->display(); + + $clauses['where'] .= " AND {$wpdb->posts}.ID = 0"; + wc_get_logger()->warning( 'returning 2 $clauses-- ' . wp_json_encode( $clauses ) ); + + return $clauses; + } + + $results = $cache[ $cache_report_key ]; + + // The current subscriptions count report will include the specific result (the subscriptions active on the last day) that should be used to generate the subscription list. + if ( ! empty( $query_vars['_data_key'] ) && isset( $results[ (int) $query_vars['_data_key'] ] ) ) { + $results = array( $results[ (int) $query_vars['_data_key'] ] ); + } + + $ids = explode( ',', implode( ',', wp_list_pluck( $results, "{$object_type}_ids", true ) ) ); + $format = implode( ', ', array_fill( 0, count( $ids ), '%d' ) ); + + // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare, WordPress.DB.PreparedSQL.InterpolatedNotPrepared + $clauses['where'] .= $wpdb->prepare( " AND {$wpdb->prefix}wc_orders.ID IN ($format)", $ids ); + + return $clauses; + } + /** * Filters the Admin orders and subscriptions table results based on a list of IDs returned by a report query. * @@ -1910,7 +1990,7 @@ class WC_Subscriptions_Admin { * @param string $insert_after_setting_id The setting id to insert the new setting after. * @param array $new_setting The new setting to insert. Can be a single setting or an array of settings. * @param string $insert_type The type of insert to perform. Can be 'single_setting' or 'multiple_settings'. Optional. Defaults to a single setting insert. - * @param string $insert_after The setting type to insert the new settings after. Optional. Default is 'first' - the setting will be inserted after the first occuring setting with the matching ID (no specific type). Pass a setting type (like 'sectionend') to insert after a setting type. + * @param string $insert_after The setting type to insert the new settings after. Optional. Default is 'first' - the setting will be inserted after the first occurring setting with the matching ID (no specific type). Pass a setting type (like 'sectionend') to insert after a setting type. */ public static function insert_setting_after( &$settings, $insert_after_setting_id, $new_setting, $insert_type = 'single_setting', $insert_after = 'first' ) { if ( ! is_array( $settings ) ) { @@ -2077,7 +2157,7 @@ class WC_Subscriptions_Admin { } /** - * Set a translation safe screen ID for Subcsription + * Set a translation safe screen ID for Subscriptions * * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.3.3 */ @@ -2160,7 +2240,7 @@ class WC_Subscriptions_Admin { * @return string $from Origin type. * @param string $to New type. * - * @return bool Whehter the variations should be deleted. + * @return bool Whether the variations should be deleted. */ public static function maybe_keep_variations( $delete_variations, $product, $from, $to ) { diff --git a/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php b/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php index d98a8af..1254c03 100644 --- a/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php +++ b/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php @@ -67,6 +67,7 @@ class WCS_Admin_Post_Types { add_action( 'parse_query', array( $this, 'shop_subscription_search_custom_fields' ) ); add_filter( 'post_updated_messages', array( $this, 'post_updated_messages' ) ); + add_filter( 'woocommerce_order_updated_messages', array( $this, 'post_updated_messages' ) ); // Add ListTable filters when CPT is enabled add_action( 'restrict_manage_posts', array( $this, 'restrict_by_product' ) ); @@ -128,7 +129,7 @@ class WCS_Admin_Post_Types { public function is_db_user_privileged() { $permissions = $this->get_special_database_privileges(); - return ( in_array( 'CREATE TEMPORARY TABLES', $permissions ) && in_array( 'INDEX', $permissions ) && in_array( 'DROP', $permissions ) ); + return ( in_array( 'CREATE TEMPORARY TABLES', $permissions, true ) && in_array( 'INDEX', $permissions, true ) && in_array( 'DROP', $permissions, true ) ); } /** @@ -187,14 +188,17 @@ class WCS_Admin_Post_Types { $table_name = substr( "{$wpdb->prefix}tmp_{$session}_lastpayment", 0, 64 ); // Let's create a temporary table, drop the previous one, because otherwise this query is hella slow + // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared $wpdb->query( "DROP TEMPORARY TABLE IF EXISTS {$table_name}" ); $wpdb->query( + // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared "CREATE TEMPORARY TABLE {$table_name} (id INT PRIMARY KEY, last_payment DATETIME) AS SELECT pm.meta_value as id, MAX( p.post_date_gmt ) as last_payment FROM {$wpdb->postmeta} pm LEFT JOIN {$wpdb->posts} p ON p.ID = pm.post_id WHERE pm.meta_key = '_subscription_renewal' - GROUP BY pm.meta_value" ); + GROUP BY pm.meta_value" + ); // Magic ends here $pieces['join'] .= "LEFT JOIN {$table_name} lp @@ -220,23 +224,25 @@ class WCS_Admin_Post_Types { return; } - $product_id = ''; + $product_id = ''; $product_string = ''; - if ( ! empty( $_GET['_wcs_product'] ) ) { - $product_id = absint( $_GET['_wcs_product'] ); + if ( ! empty( $_GET['_wcs_product'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + $product_id = absint( $_GET['_wcs_product'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended $product_string = wc_get_product( $product_id )->get_formatted_name(); } - WCS_Select2::render( array( - 'class' => 'wc-product-search', - 'name' => '_wcs_product', - 'placeholder' => esc_attr__( 'Search for a product…', 'woocommerce-subscriptions' ), - 'action' => 'woocommerce_json_search_products_and_variations', - 'selected' => strip_tags( $product_string ), - 'value' => $product_id, - 'allow_clear' => 'true', - ) ); + WCS_Select2::render( + array( + 'class' => 'wc-product-search', + 'name' => '_wcs_product', + 'placeholder' => esc_attr__( 'Search for a product…', 'woocommerce-subscriptions' ), + 'action' => 'woocommerce_json_search_products_and_variations', + 'selected' => wp_strip_all_tags( $product_string ), + 'value' => $product_id, + 'allow_clear' => 'true', + ) + ); } /** @@ -360,9 +366,9 @@ class WCS_Admin_Post_Types { $action = ''; - if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) { + if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) { // phpcs:ignore $action = wc_clean( wp_unslash( $_REQUEST['action'] ) ); - } elseif ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) { + } elseif ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) { // phpcs:ignore $action = wc_clean( wp_unslash( $_REQUEST['action2'] ) ); } @@ -549,10 +555,10 @@ class WCS_Admin_Post_Types { break; case 'order_title': - $customer_tip = ''; - if ( $address = $the_subscription->get_formatted_billing_address() ) { + $address = $the_subscription->get_formatted_billing_address(); + if ( $address ) { $customer_tip .= _x( 'Billing:', 'meaning billing address', 'woocommerce-subscriptions' ) . ' ' . esc_html( $address ); } @@ -567,15 +573,16 @@ class WCS_Admin_Post_Types { } if ( ! empty( $customer_tip ) ) { - echo '
'; // XSS ok. + echo '
'; // phpcs:ignore Standard.Category.SniffName.ErrorCode } // This is to stop PHP from complaining $username = ''; - if ( $the_subscription->get_user_id() && ( false !== ( $user_info = get_userdata( $the_subscription->get_user_id() ) ) ) ) { + $user_info = get_userdata( $the_subscription->get_user_id() ); + if ( $the_subscription->get_user_id() && ( false !== $user_info ) ) { - $username = ''; + $username = ''; if ( $the_subscription->get_billing_first_name() || $the_subscription->get_billing_last_name() ) { $username .= esc_html( ucfirst( $the_subscription->get_billing_first_name() ) . ' ' . ucfirst( $the_subscription->get_billing_last_name() ) ); @@ -639,7 +646,7 @@ class WCS_Admin_Post_Types { break; case 'recurring_total': - $column_content .= esc_html( strip_tags( $the_subscription->get_formatted_order_total() ) ); + $column_content .= esc_html( wp_strip_all_tags( $the_subscription->get_formatted_order_total() ) ); $column_content .= ''; // translators: placeholder is the display name of a payment gateway a subscription was paid by $column_content .= esc_html( sprintf( __( 'Via %s', 'woocommerce-subscriptions' ), $the_subscription->get_payment_method_to_display() ) ); @@ -682,7 +689,7 @@ class WCS_Admin_Post_Types { $date_type = array_key_exists( $column, $date_type_map ) ? $date_type_map[ $column ] : $column; $datetime = wcs_get_datetime_from( $subscription->get_time( $date_type ) ); - if ( 0 == $subscription->get_time( $date_type, 'gmt' ) ) { + if ( 0 == $subscription->get_time( $date_type, 'gmt' ) ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison $column_content = '-'; } else { $accurate_date = $datetime->date_i18n( __( 'Y/m/d g:i:s A', 'woocommerce-subscriptions' ) ); @@ -744,7 +751,6 @@ class WCS_Admin_Post_Types { /** * Search custom fields as well as content. * - * @access public * @param WP_Query $wp * @return void */ @@ -755,7 +761,7 @@ class WCS_Admin_Post_Types { return; } - $post_ids = wcs_subscription_search( $_GET['s'] ); + $post_ids = isset( $_GET['s'] ) ? wcs_subscription_search( wc_clean( wp_unslash( $_GET['s'] ) ) ) : []; // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( ! empty( $post_ids ) ) { @@ -773,7 +779,6 @@ class WCS_Admin_Post_Types { /** * Change the label when searching orders. * - * @access public * @param mixed $query * @return string */ @@ -792,13 +797,12 @@ class WCS_Admin_Post_Types { return $query; } - return wp_unslash( $_GET['s'] ); + return isset( $_GET['s'] ) ? wc_clean( wp_unslash( $_GET['s'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended } /** * Query vars for custom searches. * - * @access public * @param mixed $public_query_vars * @return array */ @@ -1056,7 +1060,7 @@ class WCS_Admin_Post_Types { * * There are a few special conditions for handling the post__in value. Namely: * - if there are no matching post_ids, the value should be array( 0 ), not an empty array() - * - if there are existing IDs in post__in, we only want to retun posts with an ID in both + * - if there are existing IDs in post__in, we only want to return posts with an ID in both * the existing set and the new set * * While this method is public, it should not be used as it will eventually be deprecated and @@ -1092,7 +1096,17 @@ class WCS_Admin_Post_Types { * @return array */ public function post_updated_messages( $messages ) { - global $post, $post_ID; + global $post, $theorder; + + if ( ! isset( $theorder ) || ! $theorder instanceof WC_Subscription ) { + if ( ! isset( $post ) || 'shop_subscription' !== $post->post_type ) { + return $messages; + } elseif ( class_exists( 'Automattic\WooCommerce\Utilities\OrderUtil' ) ) { + \Automattic\WooCommerce\Utilities\OrderUtil::init_theorder_object( $post ); + } else { + return $messages; + } + } $messages['shop_subscription'] = array( 0 => '', // Unused. Messages start at index 1. @@ -1101,12 +1115,12 @@ class WCS_Admin_Post_Types { 3 => __( 'Custom field deleted.', 'woocommerce-subscriptions' ), 4 => __( 'Subscription updated.', 'woocommerce-subscriptions' ), // translators: placeholder is previous post title - 5 => isset( $_GET['revision'] ) ? sprintf( _x( 'Subscription restored to revision from %s', 'used in post updated messages', 'woocommerce-subscriptions' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, + 5 => isset( $_GET['revision'] ) ? sprintf( _x( 'Subscription restored to revision from %s', 'used in post updated messages', 'woocommerce-subscriptions' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, // // phpcs:ignore WordPress.Security.NonceVerification.Recommended 6 => __( 'Subscription updated.', 'woocommerce-subscriptions' ), 7 => __( 'Subscription saved.', 'woocommerce-subscriptions' ), 8 => __( 'Subscription submitted.', 'woocommerce-subscriptions' ), // translators: php date string - 9 => sprintf( __( 'Subscription scheduled for: %1$s.', 'woocommerce-subscriptions' ), '' . date_i18n( _x( 'M j, Y @ G:i', 'used in "Subscription scheduled for "', 'woocommerce-subscriptions' ), wcs_date_to_time( $post->post_date ) ) . '' ), + 9 => sprintf( __( 'Subscription scheduled for: %1$s.', 'woocommerce-subscriptions' ), '' . date_i18n( _x( 'M j, Y @ G:i', 'used in "Subscription scheduled for "', 'woocommerce-subscriptions' ), strtotime( $theorder->get_date_created() ?? $post->post_date ) ) . '' ), 10 => __( 'Subscription draft updated.', 'woocommerce-subscriptions' ), ); @@ -1146,19 +1160,21 @@ class WCS_Admin_Post_Types { return; } - $selected_gateway_id = ( ! empty( $_GET['_payment_method'] ) ) ? $_GET['_payment_method'] : ''; ?> + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + $selected_gateway_id = ( ! empty( $_GET['_payment_method'] ) ) ? wc_clean( wp_unslash( $_GET['_payment_method'] ) ) : ''; ?> + post_type ) { + if ( 'shop_subscription' === $post->post_type ) { $actions = array(); } @@ -1207,12 +1223,15 @@ class WCS_Admin_Post_Types { wcs_deprecated_argument( __METHOD__, '3.0.7', 'The second parameter (product) is no longer used.' ); } - $item_meta_html = wc_display_item_meta( $item, array( + $item_meta_html = wc_display_item_meta( + $item, + array( 'before' => '', 'after' => '', 'separator' => '', 'echo' => false, - ) ); + ) + ); return $item_meta_html; } @@ -1226,7 +1245,7 @@ class WCS_Admin_Post_Types { */ protected static function get_item_name_html( $item, $_product, $include_quantity = 'include_quantity' ) { - $item_quantity = absint( $item['qty'] ); + $item_quantity = absint( $item['qty'] ); $item_name = ''; @@ -1271,8 +1290,9 @@ class WCS_Admin_Post_Types { echo wp_kses( $item_name, array( 'a' => array( 'href' => array() ) ) ); if ( $item_meta_html ) { - echo wcs_help_tip( $item_meta_html, true ); - } ?> + echo esc_html( wcs_help_tip( $item_meta_html, true ) ); + } + ?> __( 'Reactivate', 'woocommerce-subscriptions' ), 'on-hold' => __( 'Suspend', 'woocommerce-subscriptions' ), @@ -1704,7 +1724,7 @@ class WCS_Admin_Post_Types { * @param string $item_name The line item's name. * @param string $item_meta_html The line item's meta HTML. * - * @return string The subcription line item column HTML content. + * @return string The subscription line item column HTML content. */ protected static function get_item_display_div( $item, $item_name, $item_meta_html ) { wcs_deprecated_function( '__METHOD__', '3.0.7' ); diff --git a/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-product-import-export-manager.php b/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-product-import-export-manager.php index 5caca28..c6134ef 100644 --- a/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-product-import-export-manager.php +++ b/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-product-import-export-manager.php @@ -54,7 +54,7 @@ class WCS_Admin_Product_Import_Export_Manager { if ( 'subscription_variation' === $product_type ) { $export_subscription_variations = true; - // All variation products are exported with the 'variation' key so remove the uneeded `subscription_variation`. + // All variation products are exported with the 'variation' key so remove the unneeded `subscription_variation`. // Further filtering by product type will be handled by the query args (see below). unset( $args['type'][ $index ] ); } elseif ( 'variation' === $product_type ) { @@ -88,7 +88,7 @@ class WCS_Admin_Product_Import_Export_Manager { } /** - * Filters product import data so subcription variations are imported correctly (as variations). + * Filters product import data so subscription variations are imported correctly (as variations). * * Subscription variations are the exact same as standard variations. What sets them apart is the fact they are linked * to a variable subscription parent rather than a standard variable product. With that in mind, we need to import them just diff --git a/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php b/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php index 308a54a..17c7e51 100644 --- a/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php +++ b/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php @@ -40,6 +40,16 @@ class WCS_WC_Admin_Manager { ) ); + // WooCommerce > Subscriptions (HPOS) + wc_admin_connect_page( + array( + 'id' => 'woocommerce-custom-orders-subscriptions', + 'screen_id' => wcs_get_page_screen_id( 'shop_subscription' ), + 'title' => __( 'Subscriptions', 'woocommerce-subscriptions' ), + 'path' => 'admin.php?page=wc-orders--shop_subscription', + ) + ); + // WooCommerce > Subscriptions > Add New. wc_admin_connect_page( array( diff --git a/vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php b/vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php index 8865305..a7f6569 100644 --- a/vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php +++ b/vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php @@ -57,7 +57,7 @@ if ( ! defined( 'ABSPATH' ) ) { : can_date_be_updated( $internal_date_key ) ) : ?> - get_time( $internal_date_key, 'site' ), array( 'name_attr' => $date_key ) ), array( 'input' => array( 'type' => array(), 'class' => array(), 'placeholder' => array(), 'name' => array(), 'id' => array(), 'maxlength' => array(), 'size' => array(), 'value' => array(), 'patten' => array() ), 'div' => array( 'class' => array() ), 'span' => array(), 'br' => array() ) ); // phpcs:ignore WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound ?> + get_time( $internal_date_key, 'site' ), array( 'name_attr' => $date_key ) ), array( 'input' => array( 'type' => array(), 'class' => array(), 'placeholder' => array(), 'name' => array(), 'id' => array(), 'maxlength' => array(), 'size' => array(), 'value' => array(), 'pattern' => array() ), 'div' => array( 'class' => array() ), 'span' => array(), 'br' => array() ) ); // phpcs:ignore WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound ?> get_date_to_display( $internal_date_key ) ); ?> diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-product-variable-subscription.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-product-variable-subscription.php index 2385d45..364b833 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wc-product-variable-subscription.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-product-variable-subscription.php @@ -296,7 +296,7 @@ class WC_Product_Variable_Subscription extends WC_Product_Variable { } /** - * Sync variable product prices with the childs lowest/highest prices. + * Sync variable product prices with the children lowest/highest prices. * * @access public * @return void diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php index 673a3f2..02174ab 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php @@ -57,7 +57,7 @@ class WC_Subscription extends WC_Order { 'billing_period' => '', 'billing_interval' => 1, 'suspension_count' => 0, - 'requires_manual_renewal' => 'true', + 'requires_manual_renewal' => true, 'cancelled_email_sent' => false, 'trial_period' => '', @@ -365,7 +365,7 @@ class WC_Subscription extends WC_Order { } break; case 'pending-cancel' : - // Only active subscriptions can be given the "pending cancellation" status, becuase it is used to account for a prepaid term + // Only active subscriptions can be given the "pending cancellation" status, because it is used to account for a prepaid term if ( $this->payment_method_supports( 'subscription_cancellation' ) ) { if ( $this->has_status( 'active' ) ) { $can_be_updated = true; @@ -953,10 +953,10 @@ class WC_Subscription extends WC_Order { * The more aptly named set_schedule_start() cannot exist because then WC core thinks the _schedule_start meta is an * internal meta key and throws errors. * - * @param string $schedule_start + * @param string $schedule_start The date to set the start date to. Should be a WC_DateTime or a string in the format 'Y-m-d H:i:s' (UTC). */ public function set_start_date( $schedule_start ) { - $this->set_prop( 'schedule_start', $schedule_start ); + $this->set_date_prop( 'start', is_a( $schedule_start, 'WC_DateTime' ) ? $schedule_start : wcs_date_to_time( $schedule_start ) ); } /** @@ -2773,7 +2773,7 @@ class WC_Subscription extends WC_Order { return false; } - // Pass a timestamp to the WC 3.0 setters becasue WC expects MySQL date strings to be in site's timezone, but we have a date string in UTC timezone + // Pass a timestamp to the WC 3.0 setters because WC expects MySQL date strings to be in site's timezone, but we have a date string in UTC timezone $timestamp = ( $datetime > 0 ) ? wcs_date_to_time( $datetime ) : 0; $this->set_last_order_date( 'date_paid', $timestamp ); diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php index 55a2572..9abe2e2 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php @@ -46,8 +46,10 @@ class WC_Subscriptions_Cart_Validator { $product = wc_get_product( $product_id ); // 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 ) ) { + if ( ! WC()->cart->is_empty() && ( ( $product && $product->is_sold_individually() ) || ! WC()->cart->find_product_in_cart( $cart_item_id ) ) ) { + $message = $cart_contains_subscription ? __( 'A subscription has been removed from your cart. Only one subscription product can be purchased at a time.', 'woocommerce-subscriptions' ) : __( 'Products have been removed from your cart. Products and subscriptions can not be purchased at the same time.', 'woocommerce-subscriptions' ); WC()->cart->empty_cart(); + wc_add_notice( $message, 'notice' ); } } elseif ( $is_subscription && wcs_cart_contains_renewal() && ! $multiple_subscriptions_possible && ! $manual_renewals_enabled ) { @@ -68,7 +70,7 @@ class WC_Subscriptions_Cart_Validator { wc_add_notice( __( 'A subscription has been removed from your cart. Products and subscriptions can not be purchased at the same time.', 'woocommerce-subscriptions' ), 'notice' ); // Redirect to cart page to remove subscription & notify shopper - add_filter( 'woocommerce_add_to_cart_fragments', array( __CLASS__, 'redirect_ajax_add_to_cart' ) ); + add_filter( 'woocommerce_add_to_cart_fragments', array( __CLASS__, 'add_to_cart_ajax_redirect' ) ); } return $valid; @@ -107,7 +109,7 @@ class WC_Subscriptions_Cart_Validator { wc_add_notice( __( 'Your cart has been emptied of subscription products. Only one subscription product can be purchased at a time.', 'woocommerce-subscriptions' ), 'notice' ); // Redirect to cart page to remove subscription & notify shopper - add_filter( 'woocommerce_add_to_cart_fragments', array( __CLASS__, 'redirect_ajax_add_to_cart' ) ); + add_filter( 'woocommerce_add_to_cart_fragments', array( __CLASS__, 'add_to_cart_ajax_redirect' ) ); break; } @@ -137,7 +139,7 @@ class WC_Subscriptions_Cart_Validator { * * Attached by @see WC_Subscriptions_Cart_Validator::validate_cart_contents_for_mixed_checkout() and * @see WC_Subscriptions_Cart_Validator::maybe_empty_cart() when the store has multiple subscription - * purcahses disabled, the cart already contains products and the customer adds a new item or logs in + * purchases disabled, the cart already contains products and the customer adds a new item or logs in * causing a cart merge. * * @since 1.0.0 - Migrated from WooCommerce Subscriptions v4.0.0 diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php index 6662818..28e6842 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php @@ -543,7 +543,7 @@ class WC_Subscriptions_Change_Payment_Gateway { wc_add_notice( $message, 'error' ); } - // Add an error notice specific to this error if it hasn't been added yet. This will generate the unique list of errors which occured. + // Add an error notice specific to this error if it hasn't been added yet. This will generate the unique list of errors which occurred. $error_message = sprintf( __( '%1$sError:%2$s %3$s', 'woocommerce-subscriptions' ), '', diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php index 393ddeb..9c51df0 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php @@ -476,7 +476,7 @@ class WC_Subscriptions_Checkout { } /** - * Enables the 'registeration required' (guest checkout) setting when purchasing subscriptions. + * Enables the 'registration required' (guest checkout) setting when purchasing subscriptions. * * @since 1.0.0 - Migrated from WooCommerce Subscriptions v3.1.0 * diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php index 1e14df6..c577ede 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php @@ -16,7 +16,7 @@ class WC_Subscriptions_Core_Plugin { * The version of subscriptions-core library. * @var string */ - protected $library_version = '7.0.0'; // WRCS: DEFINED_VERSION. + protected $library_version = '7.1.1'; // WRCS: DEFINED_VERSION. /** * The subscription scheduler instance. @@ -94,7 +94,7 @@ class WC_Subscriptions_Core_Plugin { } /** - * Defines WC Subscriptions contants. + * Defines WC Subscriptions constants. */ protected function define_constants() { define( 'WCS_INIT_TIMESTAMP', gmdate( 'U' ) ); @@ -531,7 +531,7 @@ class WC_Subscriptions_Core_Plugin { public function load_plugin_textdomain() { $plugin_rel_path = apply_filters( 'woocommerce_subscriptions_translation_file_rel_path', $this->get_subscriptions_core_directory() . '/languages' ); - // Then check for a language file in /wp-content/plugins/woocommerce-subscriptions/languages/ (this will be overriden by any file already loaded) + // Then check for a language file in /wp-content/plugins/woocommerce-subscriptions/languages/ (this will be overridden by any file already loaded) load_plugin_textdomain( 'woocommerce-subscriptions', false, $plugin_rel_path ); } diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-coupon.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-coupon.php index bc51f6a..c0a9699 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-coupon.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-coupon.php @@ -727,7 +727,7 @@ class WC_Subscriptions_Coupon { * @since 1.0.0 - Migrated from WooCommerce Subscriptions v4.0.0 * * @param string $coupon_type The coupon's type. - * @return bool Whether the coupon is a recuring cart virtual coupon. + * @return bool Whether the coupon is a recurring cart virtual coupon. */ public static function is_renewal_cart_coupon( $coupon_type ) { return isset( self::$renewal_coupons[ $coupon_type ] ); @@ -739,7 +739,7 @@ class WC_Subscriptions_Coupon { * @since 1.0.0 - Migrated from WooCommerce Subscriptions v4.0.0 * * @param string $coupon_type The coupon's type. - * @return bool Whether the coupon is a recuring cart virtual coupon. + * @return bool Whether the coupon is a recurring cart virtual coupon. */ public static function is_recurring_coupon( $coupon_type ) { return isset( self::$recurring_coupons[ $coupon_type ] ); @@ -933,7 +933,7 @@ class WC_Subscriptions_Coupon { if ( ! empty( self::$removed_coupons ) ) { - // Can't use $cart->add_dicount here as it calls calculate_totals() + // Can't use $cart->add_discount here as it calls calculate_totals() $cart->applied_coupons = array_merge( $cart->applied_coupons, self::$removed_coupons ); if ( isset( $cart->coupons ) ) { // WC 2.3+ diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php index 7667b34..f57aed5 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php @@ -1369,7 +1369,7 @@ class WC_Subscriptions_Manager { } /** - * A subscription now either has an end date or it doesn't, there is no way to calculate it based on the original subsciption + * A subscription now either has an end date or it doesn't, there is no way to calculate it based on the original subscription * product (because a WC_Subscription object can have more than one product and syncing length with expiration date was both * cumbersome and error prone). * @@ -1852,9 +1852,9 @@ class WC_Subscriptions_Manager { */ public static function get_amount_from_proportion( $total, $proportion ) { - $sign_up_fee_proprotion = 1 - $proportion; + $sign_up_fee_proportion = 1 - $proportion; - $sign_up_total = round( $total * $sign_up_fee_proprotion, 2 ); + $sign_up_total = round( $total * $sign_up_fee_proportion, 2 ); $recurring_amount = round( $total * $proportion, 2 ); // Handle any rounding bugs @@ -2058,7 +2058,7 @@ class WC_Subscriptions_Manager { * if the amount is for $0 (and therefore, there is no payment to be processed by a gateway, and likely * no gateway used on the initial order). * - * If a subscription has a $0 recurring total and is not already active (after being actived by something else + * If a subscription has a $0 recurring total and is not already active (after being activated by something else * handling the 'scheduled_subscription_payment' with the default priority of 10), then this function will call * @see self::process_subscription_payment() to reactive the subscription, generate a renewal order etc. * diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php index c49b859..893c63f 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php @@ -608,7 +608,7 @@ class WC_Subscriptions_Order { /* Edit Order Page Content */ /** - * Returns all parent subscription orders for a user, specificed with $user_id + * Returns all parent subscription orders for a user, specified with $user_id * * @return array An array of order IDs. * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.4 @@ -787,7 +787,7 @@ class WC_Subscriptions_Order { } /** - * Filters the arguments to be pased to `wc_get_orders()` under the Woocommerce -> Orders screen. + * Filters the arguments to be passed to `wc_get_orders()` under the Woocommerce -> Orders screen. * * @since 6.3.0 * @@ -947,7 +947,7 @@ class WC_Subscriptions_Order { * against the line item on the original order for that subscription. * * In v2.0, this data was moved to a distinct subscription object which had its own line items for those amounts. - * This function bridges the two data structures to support deprecated functions used to retreive a subscription's + * This function bridges the two data structures to support deprecated functions used to retrieve a subscription's * meta data from the original order rather than the subscription itself. * * @param WC_Order $order A WC_Order object @@ -985,7 +985,7 @@ class WC_Subscriptions_Order { * against the line item on the original order for that subscription. * * In v2.0, this data was moved to a distinct subscription object which had its own line items for those amounts. - * This function bridges the two data structures to support deprecated functions used to retreive a subscription's + * This function bridges the two data structures to support deprecated functions used to retrieve a subscription's * meta data from the original order rather than the subscription itself. * * @param WC_Order $order A WC_Order object @@ -1388,7 +1388,7 @@ class WC_Subscriptions_Order { } /** - * Checks if an order contains an in active subscription and if it does, denies download acces + * Checks if an order contains an in active subscription and if it does, denies download access * to files purchased on the order. * * @return bool False if the order contains a subscription that has expired or is cancelled/on-hold, otherwise, the original value of $download_permitted @@ -2157,7 +2157,7 @@ class WC_Subscriptions_Order { /** * Returns the amount outstanding on a subscription product. * - * Deprecated because the subscription oustanding balance on a subscription is no longer added and an order can contain more + * Deprecated because the subscription outstanding balance on a subscription is no longer added and an order can contain more * than one subscription. * * @param WC_Order $order The WC_Order object of the order for which you want to determine the number of failed payments. @@ -2170,9 +2170,9 @@ class WC_Subscriptions_Order { $failed_payment_count = self::get_failed_payment_count( $order, $product_id ); - $oustanding_balance = $failed_payment_count * self::get_recurring_total( $order, $product_id ); + $outstanding_balance = $failed_payment_count * self::get_recurring_total( $order, $product_id ); - return $oustanding_balance; + return $outstanding_balance; } /** diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-product.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-product.php index a4da83e..cee38c7 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-product.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-product.php @@ -883,7 +883,7 @@ class WC_Subscriptions_Product { * @param string $bulk_action The bulk edit action being performed * @param array $data An array of data relating to the bulk edit action. $data['value'] represents the new value for the meta. * @param int $variable_product_id The post ID of the parent variable product. - * @param array $variation_ids An array of post IDs for the variable prodcut's variations. + * @param array $variation_ids An array of post IDs for the variable product's variations. * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.5.29 */ public static function bulk_edit_variations( $bulk_action, $data, $variable_product_id, $variation_ids ) { diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-renewal-order.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-renewal-order.php index c34b079..d9c73a5 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-renewal-order.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-renewal-order.php @@ -437,7 +437,7 @@ class WC_Subscriptions_Renewal_Order { * @param string $product_id The ID of the subscription product in the order which needs to be added to the new order. * @param array $args (optional) An array of name => value flags: * 'new_order_role' string A flag to indicate whether the new order should become the master order for the subscription. Accepts either 'parent' or 'child'. Defaults to 'parent' - replace the existing order. - * 'checkout_renewal' bool Indicates if invoked from an interactive cart/checkout session and certain order items are not set, like taxes, shipping as they need to be set in teh calling function, like @see WC_Subscriptions_Checkout::filter_woocommerce_create_order(). Default false. + * 'checkout_renewal' bool Indicates if invoked from an interactive cart/checkout session and certain order items are not set, like taxes, shipping as they need to be set in the calling function, like @see WC_Subscriptions_Checkout::filter_woocommerce_create_order(). Default false. * 'failed_order_id' int For checkout_renewal true, indicates order id being replaced * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.2 * @deprecated 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php index 9f6a468..a92c233 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php @@ -292,7 +292,7 @@ class WC_Subscriptions_Synchroniser { 'options' => self::get_billing_period_ranges( $subscription_period ), 'description' => self::$sync_description, 'desc_tip' => true, - 'value' => $payment_day, // Explicity set value in to ensure backward compatibility + 'value' => $payment_day, // Explicitly set value in to ensure backward compatibility ) ); @@ -603,7 +603,7 @@ class WC_Subscriptions_Synchroniser { * * @param WC_Product $product A subscription product. * @param string $type (optional) The format to return the first payment date in, either 'mysql' or 'timestamp'. Default 'mysql'. - * @param string $from_date (optional) The date to calculate the first payment from in GMT/UTC timzeone. If not set, it will use the current date. This should not include any trial period on the product. + * @param string $from_date (optional) The date to calculate the first payment from in GMT/UTC timezone. If not set, it will use the current date. This should not include any trial period on the product. * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.5 */ public static function calculate_first_payment_date( $product, $type = 'mysql', $from_date = '' ) { @@ -1312,7 +1312,7 @@ class WC_Subscriptions_Synchroniser { * Gets the number of sign-up grace period days. * * @since 1.0.0 - Migrated from WooCommerce Subscriptions v3.0.6 - * @return int The number of days in the grace period. 0 will be returned if the stroe isn't charging the full recurring price on sign-up -- a prerequiste for setting a grace period. + * @return int The number of days in the grace period. 0 will be returned if the store isn't charging the full recurring price on sign-up -- a prerequisite for setting a grace period. */ private static function get_number_of_grace_period_days() { return get_option( self::$setting_id_proration, 'no' ) === 'recurring' ? get_option( self::$setting_id_days_no_fee ) : 0; @@ -1483,7 +1483,7 @@ class WC_Subscriptions_Synchroniser { /** * Check if a given order included a subscription that is synced to a certain day. * - * Deprecated becasuse _order_contains_synced_subscription is no longer stored on the order @see self::subscription_contains_synced_product + * Deprecated because _order_contains_synced_subscription is no longer stored on the order @see self::subscription_contains_synced_product * * @param int $order_id The ID or a WC_Order item to check. * @return bool Returns true if the order contains a synced subscription, otherwise, false. diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-action-scheduler.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-action-scheduler.php index 5c7333f..7ce9b05 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-action-scheduler.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-action-scheduler.php @@ -30,7 +30,7 @@ class WCS_Action_Scheduler extends WCS_Scheduler { * * @param object $subscription An instance of a WC_Subscription object * @param string $date_type Can be 'trial_end', 'next_payment', 'payment_retry', 'end', 'end_of_prepaid_term' or a custom date type - * @param string $datetime A MySQL formated date/time string in the GMT/UTC timezone. + * @param string $datetime A MySQL formatted date/time string in the GMT/UTC timezone. */ public function update_date( $subscription, $date_type, $datetime ) { @@ -77,7 +77,7 @@ class WCS_Action_Scheduler extends WCS_Scheduler { * * @param object $subscription An instance of a WC_Subscription object * @param string $date_type Can be 'trial_end', 'next_payment', 'end', 'end_of_prepaid_term' or a custom date type - * @param string $datetime A MySQL formated date/time string in the GMT/UTC timezone. + * @param string $datetime A MySQL formatted date/time string in the GMT/UTC timezone. */ public function update_status( $subscription, $new_status, $old_status ) { diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-initial-payment.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-initial-payment.php index eb97e53..9697f71 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-initial-payment.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-initial-payment.php @@ -27,7 +27,7 @@ class WCS_Cart_Initial_Payment extends WCS_Cart_Renewal { // Apply initial discounts when there is a pending initial order add_action( 'woocommerce_setup_cart_for_subscription_initial_payment', array( $this, 'setup_discounts' ) ); - // Initialise the stock mananger. + // Initialise the stock manager. WCS_Initial_Cart_Stock_Manager::attach_callbacks(); } diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php index 4cd2b91..bd6c7e0 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php @@ -465,7 +465,7 @@ class WCS_Cart_Renewal { if ( isset( $item_to_renew['_subtracted_base_location_taxes'] ) ) { $price += array_sum( $item_to_renew['_subtracted_base_location_taxes'] ) * $item_to_renew['qty']; - } else { + } elseif ( isset( $item_to_renew['taxes']['subtotal'] ) ) { $price += array_sum( $item_to_renew['taxes']['subtotal'] ); // Use the taxes array items here as they contain taxes to a more accurate number of decimals. } } @@ -927,7 +927,7 @@ class WCS_Cart_Renewal { * Allow other plugins to remove/add fees of an existing order prior to building the cart without changing the saved order values * (e.g. payment gateway based fees can remove fees and later can add new fees depending on the actual selected payment gateway) * - * @param WC_Order $order is renderd by reference - change meta data of this object + * @param WC_Order $order is rendered by reference - change meta data of this object * @param WC_Cart $cart * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.2.9 */ @@ -1835,7 +1835,7 @@ class WCS_Cart_Renewal { $order_id = absint( WC()->session->order_awaiting_payment ); - // Guard against infinite loops in WC 3.0+ where default order staus is set in WC_Abstract_Order::__construct() + // Guard against infinite loops in WC 3.0+ where default order status is set in WC_Abstract_Order::__construct() remove_filter( 'woocommerce_default_order_status', array( &$this, __FUNCTION__ ), 10 ); $order = $order_id > 0 ? wc_get_order( $order_id ) : null; diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-resubscribe.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-resubscribe.php index d08702e..29e229e 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-resubscribe.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-resubscribe.php @@ -169,7 +169,7 @@ class WCS_Cart_Resubscribe extends WCS_Cart_Renewal { // Need to get the original subscription price, not the current price $subscription = wcs_get_subscription( $cart_item[ $this->cart_item_key ]['subscription_id'] ); if ( $subscription ) { - // Make sure the original subscription terms perisist + // Make sure the original subscription terms persist $_product = $cart_item_session_data['data']; wcs_set_objects_property( $_product, 'subscription_period', $subscription->get_billing_period(), 'set_prop_only' ); wcs_set_objects_property( $_product, 'subscription_period_interval', $subscription->get_billing_interval(), 'set_prop_only' ); diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-download-handler.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-download-handler.php index cdfefcb..94f9fb7 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-download-handler.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-download-handler.php @@ -120,7 +120,7 @@ class WCS_Download_Handler { * download permissions stored on the subscription rather than the original order as the URL would have the wrong order * key. This function takes the same parameters, but queries the database again for download ids belonging to all the * subscriptions that were in the original order. Then for all subscriptions, it checks all items, and if the item - * passed in here is in that subscription, it creates the correct download link to be passsed to the email. + * passed in here is in that subscription, it creates the correct download link to be passed to the email. * * @param array $files List of files already included in the list * @param array $item An item (you get it by doing $order->get_items()) @@ -196,7 +196,7 @@ class WCS_Download_Handler { } /** - * Remove download permissions attached to a subscription when it is permenantly deleted. + * Remove download permissions attached to a subscription when it is permanently deleted. * * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 * @@ -209,7 +209,7 @@ class WCS_Download_Handler { } /** - * Remove download permissions attached to a subscription when it is permenantly deleted. + * Remove download permissions attached to a subscription when it is permanently deleted. * * @since 5.2.0 * diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-failed-scheduled-action-manager.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-failed-scheduled-action-manager.php index 56d78c2..6c6b71e 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-failed-scheduled-action-manager.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-failed-scheduled-action-manager.php @@ -68,11 +68,14 @@ class WCS_Failed_Scheduled_Action_Manager { /** * Log a message to the failed-scheduled-actions log. * - * @param string $message the message to be written to the log. * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.2.19 + * + * @param string $message the message to be written to the log. + * @param array $context the context to be included in the log. Optional. Default is an empty array. */ - protected function log( $message ) { - $this->logger->add( 'failed-scheduled-actions', $message ); + protected function log( $message, $context = [] ) { + $context['source'] = 'failed-scheduled-actions'; + wc_get_logger()->error( $message, $context ); } /** @@ -90,20 +93,40 @@ class WCS_Failed_Scheduled_Action_Manager { } $subscription_action = $this->get_action_hook_label( $action->get_hook() ); + $context = $this->get_context_from_action_error( $action, $error ); switch ( current_filter() ) { case 'action_scheduler_failed_action': - $this->log( sprintf( 'scheduled action %s (%s) failed to finish processing after %s seconds', $action_id, $subscription_action, absint( $error ) ) ); + $this->log( sprintf( 'scheduled action %s (%s) failed to finish processing after %s seconds', $action_id, $subscription_action, absint( $error ) ), $context ); break; case 'action_scheduler_failed_execution': - $this->log( sprintf( 'scheduled action %s (%s) failed to finish processing due to the following exception: %s', $action_id, $subscription_action, $error->getMessage() ) ); + $this->log( sprintf( 'scheduled action %s (%s) failed to finish processing due to the following exception: %s', $action_id, $subscription_action, $this->get_message_from_exception( $error ) ), $context ); break; case 'action_scheduler_unexpected_shutdown': - $this->log( sprintf( 'scheduled action %s (%s) failed to finish processing due to the following error: %s', $action_id, $subscription_action, $error['message'] ) ); + $this->log( sprintf( 'scheduled action %s (%s) failed to finish processing due to the following error: %s', $action_id, $subscription_action, $this->get_message_from_error( $error ) ), $context ); break; } - $this->log( sprintf( 'action args: %s', $this->get_action_args_string( $action->get_args() ) ) ); + // Prior to WC 8.6 the logger didn't display the context inline with the message so on those versions we log the context separately. + if ( wcs_is_woocommerce_pre( '8.6' ) ) { + foreach ( $context as $key => $value ) { + if ( is_array( $value ) ) { + $value = implode( PHP_EOL, $value ); + } + + $this->log( "{$key}: {$value}" ); + } + } + + // Log any exceptions caught by the exception listener in action logs. + if ( ! empty( $context['exceptions'] ) ) { + foreach ( $context['exceptions'] as $exception_message ) { + ActionScheduler_Logger::instance()->log( $action_id, $exception_message ); + } + } + + // Now that we've logged the exceptions, we can detach the exception listener. + $this->clear_exceptions_and_detach_listener(); // Store information about the scheduled action for displaying an admin notice $failed_scheduled_actions = get_option( WC_Subscriptions_Admin::$option_prefix . '_failed_scheduled_actions', array() ); @@ -114,18 +137,6 @@ class WCS_Failed_Scheduled_Action_Manager { ); update_option( WC_Subscriptions_Admin::$option_prefix . '_failed_scheduled_actions', $failed_scheduled_actions ); - - // If there is an exception listener and it's caught exceptions, log them for additional debugging. - if ( ! empty( $this->exceptions ) ) { - foreach ( $this->exceptions as $exception ) { - $message = 'Exception: ' . $exception->getMessage() . ' in ' . $exception->getFile() . ':' . $exception->getLine(); - $this->log( $message . PHP_EOL . $exception->getTraceAsString() ); - ActionScheduler_Logger::instance()->log( $action_id, $message ); - } - - // Now that we've logged the exceptions, we can detach the exception listener. - $this->clear_exceptions_and_detach_listener(); - } } /** @@ -279,4 +290,68 @@ class WCS_Failed_Scheduled_Action_Manager { $store = ActionScheduler_Store::instance(); return $store->fetch_action( $action_id ); } + + /** + * Generates a message from an exception. + * + * @param Exception $exception The exception to generate a message from. + * @return string The message. + */ + protected function get_message_from_exception( $exception ) { + // When Action Scheduler throws an exception, it wraps the original exception in a new Exception. Information about the actual error is stored in the previous exception. + $previous = $exception->getPrevious(); + $exception = $previous ? $previous : $exception; + + return $exception->getMessage() . ' in ' . $exception->getFile() . ':' . $exception->getLine(); + } + + /** + * Generates a message from an error array. + * + * The $error variable is obtained from get_last_error() and has standard keys message, file and line. + * + * @param array $error The error data to generate a message from. + * @return string The message including the file and line number if available.s + */ + protected function get_message_from_error( $error ) { + $message = $error['message']; + + if ( isset( $error['file'] ) ) { + $message .= " in {$error['file']}"; + + if ( isset( $error['line'] ) ) { + $message .= ":{$error['line']}"; + } + } + + return $message; + } + + /** + * Generates the additional context data that will be recorded with the error log entry. + * The context includes the action args, a backtrace and any exception messages caught. + * + * @param ActionScheduler_Action $action The ActionScheduler_Action that failed. + * @param int|Exception|array $error The error data that caused the failure. + */ + protected function get_context_from_action_error( $action, $error ) { + $context = [ + 'action_args' => $this->get_action_args_string( $action->get_args() ), + ]; + + if ( is_a( $error, 'Exception' ) ) { + // Action scheduler has a nested a try-catch block and so the original caught exception is stored in the previous exception. + $previous_exception = $error->getPrevious(); + $context['error_trace'] = $previous_exception ? $previous_exception->getTraceAsString() : $error->getTraceAsString(); + } + + // If there is an exception listener and it has caught exceptions, log them for additional debugging. + if ( ! empty( $this->exceptions ) ) { + foreach ( $this->exceptions as $exception ) { + $context['exceptions'][] = $this->get_message_from_exception( $exception ); + } + } + + return $context; + } } diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-my-account-payment-methods.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-my-account-payment-methods.php index 6a4e174..c4556dd 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-my-account-payment-methods.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-my-account-payment-methods.php @@ -56,7 +56,7 @@ class WCS_My_Account_Payment_Methods { * Allow third-party gateways to override whether the token delete button should be removed. * * Some gateways, like Bambora, don't allow customers to add a new card with the same card number but different expiry or cvv. - * This means customers updating their expiring card need to delete the exisitng card first before adding the new one. This + * This means customers updating their expiring card need to delete the existing card first before adding the new one. This * isn't possible however because we prevent deleting tokens linked to active subscriptions. * * Gateways can use this filter to make their own checks to allow deletion. diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-post-meta-cache-manager-many-to-one.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-post-meta-cache-manager-many-to-one.php index 43ed68c..6f3fe85 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-post-meta-cache-manager-many-to-one.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-post-meta-cache-manager-many-to-one.php @@ -17,7 +17,7 @@ class WCS_Post_Meta_Cache_Manager_Many_To_One extends WCS_Post_Meta_Cache_Manage /** * When post meta is updated, check if this class instance cares about updating its cache * to reflect the change. Always pass the previous value, to make sure that any existing - * relationships are also deleted because we know the data should not allow realtionships + * relationships are also deleted because we know the data should not allow relationships * with multiple other values. e.g. a subscription can only belong to one customer. * * @param int $meta_id The ID of the post meta row in the database. diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-sql-transaction.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-sql-transaction.php index 25b9f86..b182507 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-sql-transaction.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-sql-transaction.php @@ -1,6 +1,6 @@ on_fatal. - * Shutdowns caused by a natural PHP termination (no error) will be rolledback or commited. @see $this->on_shutdown. + * Shutdowns caused by a fatal will be rolledback or committed @see $this->on_fatal. + * Shutdowns caused by a natural PHP termination (no error) will be rolledback or committed. @see $this->on_shutdown. * * @since 1.0.0 - Migrated from WooCommerce Subscriptions v3.1.0 */ diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-staging.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-staging.php index 4240137..e9acb3f 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-staging.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-staging.php @@ -267,8 +267,8 @@ class WCS_Staging { /** * Gets the sites WordPress or Subscriptions URL. * - * WordPress - This is typically the URL the current site is accessable via. - * Subscriptions is the URL Subscritpions considers to be the URL to process live payments on. It may differ to the WP URL if the site has moved. + * WordPress - This is typically the URL the current site is accessible via. + * Subscriptions is the URL Subscriptions considers to be the URL to process live payments on. It may differ to the WP URL if the site has moved. * * @since 1.0.0 - Migrated from WooCommerce Subscriptions v4.0.0 * diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-template-loader.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-template-loader.php index b437e64..5b99eec 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-template-loader.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-template-loader.php @@ -364,7 +364,7 @@ class WCS_Template_Loader { * @since 1.4.0 * * @param string $template - * @param string $tempalte_name + * @param string $template_name * @param array $args * @param string $template_path * @param diff --git a/vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php b/vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php index ee8dab6..1ac9a27 100644 --- a/vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php +++ b/vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php @@ -113,6 +113,10 @@ class WCS_Customer_Store_Cached_CPT extends WCS_Customer_Store_CPT implements WC $this->update_subscription_id_cache( $user_id, $subscription_ids ); } + if ( ! is_array( $subscription_ids ) ) { + return []; + } + // Sort results in order to keep consistency between cached results and queried results. rsort( $subscription_ids ); diff --git a/vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-subscription-data-store-cpt.php b/vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-subscription-data-store-cpt.php index 5f3c57c..b28e7a8 100644 --- a/vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-subscription-data-store-cpt.php +++ b/vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-subscription-data-store-cpt.php @@ -216,10 +216,10 @@ class WCS_Subscription_Data_Store_CPT extends WC_Order_Data_Store_CPT implements */ public function update( &$subscription ) { - // We don't want to call parent here becuase WC_Order_Data_Store_CPT includes a JIT setting of the paid date which is not needed for subscriptions, and also very resource intensive + // We don't want to call parent here because WC_Order_Data_Store_CPT includes a JIT setting of the paid date which is not needed for subscriptions, and also very resource intensive Abstract_WC_Order_Data_Store_CPT::update( $subscription ); - // We used to call parent::update() above, which triggered this hook, so we trigger it manually here for backward compatibilty (and to improve compatibility with 3rd party code which may run validation or additional operations on it which should also be applied to a subscription) + // We used to call parent::update() above, which triggered this hook, so we trigger it manually here for backward compatibility (and to improve compatibility with 3rd party code which may run validation or additional operations on it which should also be applied to a subscription) do_action( 'woocommerce_update_order', $subscription->get_id(), $subscription ); do_action( 'woocommerce_update_subscription', $subscription->get_id(), $subscription ); diff --git a/vendor/woocommerce/subscriptions-core/includes/deprecated/class-wcs-filter-deprecator.php b/vendor/woocommerce/subscriptions-core/includes/deprecated/class-wcs-filter-deprecator.php index 64c9d31..818f069 100644 --- a/vendor/woocommerce/subscriptions-core/includes/deprecated/class-wcs-filter-deprecator.php +++ b/vendor/woocommerce/subscriptions-core/includes/deprecated/class-wcs-filter-deprecator.php @@ -5,7 +5,7 @@ * When triggering a filter which has a deprecated equivalient from Subscriptions v1.n, check if the old * filter had any callbacks attached to it, and if so, log a notice and trigger the old filter with a set * of parameters in the deprecated format so that the current return value also has the old filters applied - * (whereever possible that is). + * (wherever possible that is). * * @package WooCommerce Subscriptions * @subpackage WCS_Hook_Deprecator diff --git a/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-request.php b/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-request.php index 021d17b..2c710fd 100644 --- a/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-request.php +++ b/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-request.php @@ -188,7 +188,7 @@ class WCS_PayPal_Reference_Transaction_API_Request { * @link https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/#id094UM0DA0HS * @link https://developer.paypal.com/docs/classic/api/merchant/DoReferenceTransaction_API_Operation_NVP/ * - * @param string $reference_id the ID of a refrence object, e.g. billing agreement ID. + * @param string $reference_id the ID of a reference object, e.g. billing agreement ID. * @param WC_Order $order order object * @param array $args { * @type string 'payment_type' (Optional) Specifies type of PayPal payment you require for the billing agreement. It is one of the following values. 'Any' or 'InstantOnly'. Echeck is not supported for DoReferenceTransaction requests. diff --git a/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-response.php b/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-response.php index 03943dc..f14a95d 100644 --- a/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-response.php +++ b/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-response.php @@ -58,7 +58,7 @@ class WCS_PayPal_Reference_Transaction_API_Response extends WC_Gateway_Paypal_Re } /** - * Checks if response contains an API error code or message relating to invalid credentails + * Checks if response contains an API error code or message relating to invalid credentials * * @link https://developer.paypal.com/docs/classic/api/errorcodes/ * diff --git a/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api.php b/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api.php index 6357f32..8ea3ca6 100644 --- a/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api.php +++ b/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api.php @@ -4,7 +4,7 @@ * * Performs reference transaction related transactions requests via the PayPal Express Checkout API, * including the creation of a billing agreement and processing renewal payments using that billing - * agremeent's ID in a reference tranasction. + * agremeent's ID in a reference transaction. * * Also hijacks checkout when PayPal Standard is chosen as the payment method, but Reference Transactions * are enabled on the store's PayPal account, to go via Express Checkout approval flow instead of the diff --git a/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-standard-ipn-handler.php b/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-standard-ipn-handler.php index b97a827..031b8e8 100644 --- a/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-standard-ipn-handler.php +++ b/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-standard-ipn-handler.php @@ -570,7 +570,7 @@ class WCS_PayPal_Standard_IPN_Handler extends WC_Gateway_Paypal_IPN_Handler { * * This function expects a generic payload, in any serialization format. It looks for an 'order key' code. This * function uses regular expressions and looks for 'order key'. WooCommerce allows plugins to modify the order - * keys through filtering, unfortunatelly we only check for the original + * keys through filtering, unfortunately we only check for the original * * @param string $payload PayPal payload data * diff --git a/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/templates/html-ipn-failure-notice.php b/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/templates/html-ipn-failure-notice.php index eb713b7..088b3b5 100644 --- a/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/templates/html-ipn-failure-notice.php +++ b/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/templates/html-ipn-failure-notice.php @@ -1,6 +1,6 @@ post->post_parent, but for variations, * $this->post refers to the parent variable object's post, so $this->post->post_parent will be 0 under - * normal circumstances. Becuase of that, we can rely on wcs_get_objects_property( $this, 'parent_id' ) + * normal circumstances. Because of that, we can rely on wcs_get_objects_property( $this, 'parent_id' ) * and define this get_parent_id() method for variations even when WC 3.0 is not active. * * @param string $key diff --git a/vendor/woocommerce/subscriptions-core/includes/legacy/class-wc-product-variable-subscription-legacy.php b/vendor/woocommerce/subscriptions-core/includes/legacy/class-wc-product-variable-subscription-legacy.php index 623afb6..669412b 100644 --- a/vendor/woocommerce/subscriptions-core/includes/legacy/class-wc-product-variable-subscription-legacy.php +++ b/vendor/woocommerce/subscriptions-core/includes/legacy/class-wc-product-variable-subscription-legacy.php @@ -174,7 +174,7 @@ class WC_Product_Variable_Subscription_Legacy extends WC_Product_Variable_Subscr /** * Create unique cache key based on the tax location (affects displayed/cached prices), product version and active price filters. - * DEVELOPERS should filter this hash if offering conditonal pricing to keep it unique. + * DEVELOPERS should filter this hash if offering conditional pricing to keep it unique. * * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.2.0 * @param WC_Product @@ -208,7 +208,7 @@ class WC_Product_Variable_Subscription_Legacy extends WC_Product_Variable_Subscr } /** - * Sync variable product prices with the childs lowest/highest prices. + * Sync variable product prices with the children lowest/highest prices. * * @access public * @return void diff --git a/vendor/woocommerce/subscriptions-core/includes/legacy/class-wc-subscription-legacy.php b/vendor/woocommerce/subscriptions-core/includes/legacy/class-wc-subscription-legacy.php index 4a98569..a7baf7c 100644 --- a/vendor/woocommerce/subscriptions-core/includes/legacy/class-wc-subscription-legacy.php +++ b/vendor/woocommerce/subscriptions-core/includes/legacy/class-wc-subscription-legacy.php @@ -453,7 +453,7 @@ class WC_Subscription_Legacy extends WC_Subscription { /** * Helper function to make sure when WC_Subscription calls get_prop() from - * it's new getters that the property is both retreived from the legacy class + * it's new getters that the property is both retrieved from the legacy class * property and done so from post meta. * * For inherited dates props, like date_created, date_modified, date_paid, diff --git a/vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy-background-updater.php b/vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy-background-updater.php index 8018b2c..39b6e23 100644 --- a/vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy-background-updater.php +++ b/vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy-background-updater.php @@ -97,7 +97,7 @@ class WCS_Privacy_Background_Updater { * * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.2.20 * @param int The order ID. - * @return bool Wether the order has a scheduled anonymization action. + * @return bool Whether the order has a scheduled anonymization action. */ protected function order_anonymization_is_scheduled( $order_id ) { return false !== as_next_scheduled_action( $this->order_anonymization_hook, array( 'order_id' => intval( $order_id ) ) ); diff --git a/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php b/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php index b310c21..c020d89 100644 --- a/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php +++ b/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php @@ -50,7 +50,7 @@ class WC_Subscriptions_Upgrader { $version_out_of_date = version_compare( self::$active_version, WC_Subscriptions_Core_Plugin::instance()->get_library_version(), '<' ); - // Set the cron lock on every request with an out of date version, regardless of authentication level, as we can only lock cron for up to 10 minutes at a time, but we need to keep it locked until the upgrade is complete, regardless of who is browing the site + // Set the cron lock on every request with an out of date version, regardless of authentication level, as we can only lock cron for up to 10 minutes at a time, but we need to keep it locked until the upgrade is complete, regardless of who is browsing the site if ( $version_out_of_date ) { self::set_cron_lock(); } diff --git a/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-repair-2-0.php b/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-repair-2-0.php index bb619ed..194dc63 100644 --- a/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-repair-2-0.php +++ b/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-repair-2-0.php @@ -171,7 +171,7 @@ class WCS_Repair_2_0 { } /** - * If the subscription does not have a subscription key for whatever reason (probably becuase the product_id was missing), then this one + * If the subscription does not have a subscription key for whatever reason (probably because the product_id was missing), then this one * fills in the blank. * * @param array $subscription data about the subscription @@ -601,10 +601,10 @@ class WCS_Repair_2_0 { if ( false === $next_date_timestamp ) { // set it to 0 as default $formatted_date = 0; - WCS_Upgrade_Logger::add( sprintf( '-- For order %d: Repairing date type "%s": fetch of date unsuccessfull: no action present. Date is 0.', $subscription['order_id'], $type ) ); + WCS_Upgrade_Logger::add( sprintf( '-- For order %d: Repairing date type "%s": fetch of date unsuccessful: no action present. Date is 0.', $subscription['order_id'], $type ) ); } else { $formatted_date = gmdate( 'Y-m-d H:i:s', $next_date_timestamp ); - WCS_Upgrade_Logger::add( sprintf( '-- For order %d: Repairing date type "%s": fetch of date successfull. New date is %s', $subscription['order_id'], $type, $formatted_date ) ); + WCS_Upgrade_Logger::add( sprintf( '-- For order %d: Repairing date type "%s": fetch of date successful. New date is %s', $subscription['order_id'], $type, $formatted_date ) ); } return $formatted_date; diff --git a/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-upgrade-1-2.php b/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-upgrade-1-2.php index c6dfb66..33350c0 100644 --- a/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-upgrade-1-2.php +++ b/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-upgrade-1-2.php @@ -197,8 +197,8 @@ class WCS_Upgrade_1_2 { // Base price * Quantity $sign_up_fee_line_subtotal = WC_Subscriptions_Order::get_meta( $order, '_cart_contents_sign_up_fee_total', 0 ) + WC_Subscriptions_Order::get_meta( $order, '_sign_up_fee_discount_cart', 0 ); - $sign_up_fee_propotion = ( $sign_up_fee_line_total > 0 ) ? $sign_up_fee_line_subtotal / $sign_up_fee_line_total : 0; - $sign_up_fee_line_subtotal_tax = WC_Subscriptions_Manager::get_amount_from_proportion( WC_Subscriptions_Order::get_meta( $order, '_sign_up_fee_tax_total', 0 ), $sign_up_fee_propotion ); + $sign_up_fee_proportion = ( $sign_up_fee_line_total > 0 ) ? $sign_up_fee_line_subtotal / $sign_up_fee_line_total : 0; + $sign_up_fee_line_subtotal_tax = WC_Subscriptions_Manager::get_amount_from_proportion( WC_Subscriptions_Order::get_meta( $order, '_sign_up_fee_tax_total', 0 ), $sign_up_fee_proportion ); if ( $has_trial ) { // Set line item totals equal to sign up fee totals diff --git a/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-upgrade-2-0.php b/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-upgrade-2-0.php index c9a7cc3..e95bc79 100644 --- a/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-upgrade-2-0.php +++ b/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-upgrade-2-0.php @@ -858,7 +858,7 @@ class WCS_Upgrade_2_0 { /** * The '_switched_subscription_key' and '_switched_subscription_new_order' post meta values are no longer used to relate orders - * and switched subscriptions, instead, we need to set a '_subscription_switch' value on the switch order and depreacted the old + * and switched subscriptions, instead, we need to set a '_subscription_switch' value on the switch order and deprecated the old * meta keys by prefixing them with '_wcs_migrated'. * * Subscriptions also sets a '_switched_subscription_item_id' value on the new line item of for the switched item and a item meta diff --git a/vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-about-2-0.php b/vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-about-2-0.php index 69216cc..9319e3f 100644 --- a/vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-about-2-0.php +++ b/vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-about-2-0.php @@ -72,7 +72,7 @@ $settings_page = admin_url( 'admin.php?page=wc-settings&tab=subscriptions' ); printf( esc_html__( 'The new interface is also built on the existing %sEdit Order%s screen. If you\'ve ever modified an order, you already know how to modify a subscription.', 'woocommerce-subscriptions' ), '', '' ); ?>

', '', '', '' ); ?>

diff --git a/vendor/woocommerce/subscriptions-core/includes/wcs-compatibility-functions.php b/vendor/woocommerce/subscriptions-core/includes/wcs-compatibility-functions.php index 4824f0f..84613c2 100644 --- a/vendor/woocommerce/subscriptions-core/includes/wcs-compatibility-functions.php +++ b/vendor/woocommerce/subscriptions-core/includes/wcs-compatibility-functions.php @@ -628,7 +628,7 @@ function wcs_is_custom_order_tables_data_sync_enabled() { /** * Sets the address on an order or subscription using WC 7.1 functions if they exist. * - * For stores pre WC 7.1, use the individual addresss type and key setter i.e. `set_billing_address_1()` method. + * For stores pre WC 7.1, use the individual address type and key setter i.e. `set_billing_address_1()` method. * * @since 5.2.0 * diff --git a/vendor/woocommerce/subscriptions-core/includes/wcs-time-functions.php b/vendor/woocommerce/subscriptions-core/includes/wcs-time-functions.php index cd918e4..45e6785 100644 --- a/vendor/woocommerce/subscriptions-core/includes/wcs-time-functions.php +++ b/vendor/woocommerce/subscriptions-core/includes/wcs-time-functions.php @@ -652,7 +652,7 @@ function wcs_is_datetime_mysql_format( $time ) { * GMT/UTC offset for that timezone, so for example, when 3rd party code has set the servers * timezone using date_default_timezone_set( 'America/Los_Angeles' ) doing something like * gmdate( "Y-m-d H:i:s", strtotime( gmdate( "Y-m-d H:i:s" ) ) ) will actually add 7 hours to - * the date even though it is a date in UTC timezone because the timezone wasn't specificed. + * the date even though it is a date in UTC timezone because the timezone wasn't specified. * * This makes sure the date is never converted. * diff --git a/vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-price.php b/vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-price.php index 271082b..4a7ae4d 100644 --- a/vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-price.php +++ b/vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-price.php @@ -117,7 +117,7 @@ if ( ! defined( 'ABSPATH' ) ) { // translators: placeholder is trial period validation message if passed an invalid value (e.g. "Trial period can not exceed 4 weeks") 'description' => sprintf( _x( 'An optional period of time to wait before charging the first recurring payment. Any sign up fee will still be charged at the outset of the subscription. %s', 'Trial period dropdown\'s description in pricing fields', 'woocommerce-subscriptions' ), self::get_trial_period_validation_message() ), 'desc_tip' => true, - 'value' => WC_Subscriptions_Product::get_trial_period( $variation->get_id() ), // Explicity set value in to ensure backward compatibility + 'value' => WC_Subscriptions_Product::get_trial_period( $variation->get_id() ), // Explicitly set value in to ensure backward compatibility ) );?> diff --git a/vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-synchronisation.php b/vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-synchronisation.php index 1daaa11..5256dde 100644 --- a/vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-synchronisation.php +++ b/vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-synchronisation.php @@ -51,7 +51,7 @@ global $wp_locale; 'options' => $wp_locale->month, 'description' => WC_Subscriptions_Synchroniser::$sync_description_year, 'desc_tip' => true, - 'value' => $payment_month, // Explicity set value in to ensure backward compatibility + 'value' => $payment_month, // Explicitly set value in to ensure backward compatibility ) ); ?> diff --git a/vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php b/vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php index 427f76f..d33a6a6 100644 --- a/vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php +++ b/vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php @@ -2,7 +2,6 @@ /** * Subscription details table * - * @author Prospress * @package WooCommerce_Subscription/Templates * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 * @version 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 @@ -25,15 +24,15 @@ if ( ! defined( 'ABSPATH' ) ) { get_items() as $item_id => $item ) { - $_product = apply_filters( 'woocommerce_subscriptions_order_item_product', $item->get_product(), $item ); + $_product = apply_filters( 'woocommerce_subscriptions_order_item_product', $item->get_product(), $item ); if ( apply_filters( 'woocommerce_order_item_visible', true, $item ) ) { ?> - - × + + × @@ -53,7 +52,7 @@ if ( ! defined( 'ABSPATH' ) ) { * @param int $item_id The subscription line item ID. * @param WC_Order_Item|array $item The subscription line item. * @param WC_Subscription $subscription The subscription. - * @param bool $plain_text Wether the item meta is being generated in a plain text context. + * @param bool $plain_text Whether the item meta is being generated in a plain text context. */ do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $subscription, false ); @@ -65,7 +64,7 @@ if ( ! defined( 'ABSPATH' ) ) { * @param int $item_id The subscription line item ID. * @param WC_Order_Item|array $item The subscription line item. * @param WC_Subscription $subscription The subscription. - * @param bool $plain_text Wether the item meta is being generated in a plain text context. + * @param bool $plain_text Whether the item meta is being generated in a plain text context. */ do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $subscription, false ); ?> @@ -77,7 +76,8 @@ if ( ! defined( 'ABSPATH' ) ) { has_status( array( 'completed', 'processing' ) ) && ( $purchase_note = get_post_meta( $_product->id, '_purchase_note', true ) ) ) { + $purchase_note = get_post_meta( $_product->get_id(), '_purchase_note', true ); + if ( $subscription->has_status( array( 'completed', 'processing' ) ) && $purchase_note ) { ?> @@ -89,7 +89,8 @@ if ( ! defined( 'ABSPATH' ) ) { $total ) : ?> + foreach ( $totals as $key => $total ) : + ?> > diff --git a/vendor/woocommerce/subscriptions-core/wcs-functions.php b/vendor/woocommerce/subscriptions-core/wcs-functions.php index 67383ce..a7ce6fc 100644 --- a/vendor/woocommerce/subscriptions-core/wcs-functions.php +++ b/vendor/woocommerce/subscriptions-core/wcs-functions.php @@ -105,7 +105,7 @@ function wcs_create_subscription( $args = array() ) { $order = ( isset( $args['order_id'] ) ) ? wc_get_order( $args['order_id'] ) : null; $default_args = array( - 'status' => '', + 'status' => apply_filters( 'woocommerce_default_subscription_status', 'pending' ), 'order_id' => 0, 'customer_note' => null, 'customer_id' => null, @@ -190,12 +190,11 @@ function wcs_create_subscription( $args = array() ) { /** * Filter the newly created subscription object. - * We need to fetch the subscription from the database as the current object state doesn't match the loaded state. * * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.2.22 * @param WC_Subscription $subscription */ - $subscription = apply_filters( 'wcs_created_subscription', wcs_get_subscription( $subscription ) ); + $subscription = apply_filters( 'wcs_created_subscription', $subscription ); /** * Triggered after a new subscription is created. diff --git a/vendor/woocommerce/subscriptions-core/woocommerce-subscriptions-core.php b/vendor/woocommerce/subscriptions-core/woocommerce-subscriptions-core.php index e63d0f9..df15150 100644 --- a/vendor/woocommerce/subscriptions-core/woocommerce-subscriptions-core.php +++ b/vendor/woocommerce/subscriptions-core/woocommerce-subscriptions-core.php @@ -6,5 +6,5 @@ * Author: Automattic * Author URI: https://woocommerce.com/ * Requires WP: 5.6 - * Version: 7.0.0 + * Version: 7.1.1 */ diff --git a/woocommerce-subscriptions.php b/woocommerce-subscriptions.php index bc24fbe..3f60f66 100644 --- a/woocommerce-subscriptions.php +++ b/woocommerce-subscriptions.php @@ -1,15 +1,15 @@