diff --git a/changelog.txt b/changelog.txt index e2a3ebe..018f1ab 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,11 @@ *** Woo Subscriptions Changelog *** +2024-02-08 - version 6.0.0 +* Add: Subscription plugin settings can now be fetched via the /wc/v3/settings/subscriptions REST API endpoint. +* Fix: Trigger the subscription.updated webhook event for all subscription updates. +* Fix: Block the UI after a customer clicks actions on the My Account > Subscriptions page to prevent multiple requests from being sent. +* Fix: WC 8.6.0 compatibility: Resolved wc_get_log_file_path() deprecation warnings. + 2024-01-17 - version 5.9.1 * Fix: Resolved an error that would occur with WooCommerce 8.5.0 when editing a subscription customer from the admin dashboard. diff --git a/includes/api/class-wc-rest-subscriptions-settings.php b/includes/api/class-wc-rest-subscriptions-settings.php new file mode 100644 index 0000000..8389228 --- /dev/null +++ b/includes/api/class-wc-rest-subscriptions-settings.php @@ -0,0 +1,106 @@ +/settings and wc//settings/{group_id} endpoint. + */ +class WC_REST_Subscriptions_Settings { + + /** + * Init class and attach callbacks. + */ + public function __construct() { + add_filter( 'woocommerce_settings_groups', [ $this, 'add_settings_group' ] ); + add_filter( 'woocommerce_settings-subscriptions', [ $this, 'add_settings' ] ); + } + + /** + * Register the subscriptions settings group for use in the WC REST API /settings endpoint + * + * @param array $groups Array of setting groups. + * + * @return array + */ + public function add_settings_group( $groups ) { + $groups[] = [ + 'id' => 'subscriptions', + 'label' => __( 'Subscriptions', 'woocommerce-subscriptions' ), + ]; + return $groups; + } + + /** + * Add subscriptions specific settings to the WC REST API /settings/subscriptions endpoint. + * + * @param array $settings Array of settings. + * + * @return array + */ + public function add_settings( $settings ) { + $subscription_settings = WC_Subscriptions_Admin::get_settings(); + + foreach( $subscription_settings as $setting ) { + // Skip settings that don't have a id, type or are an invalid setting type i.e. skip over title, sectionend, etc. + if ( empty( $setting['id'] ) || empty( $setting['type'] ) || ! $this->is_setting_type_valid( $setting['type'] ) ) { + continue; + } + + $settings[] = $this->format_setting( $setting ); + } + + return $settings; + } + + /** + * Checks if a setting type is a valid supported setting type. + * + * @param string $type Type. + * + * @return bool + */ + private function is_setting_type_valid( $type ) { + return in_array( $type, [ 'text', 'email', 'number', 'color', 'password', 'textarea', 'select', 'multiselect', 'radio', 'checkbox', 'image_width', 'thumbnail_cropping' ], true ); + } + + /** + * Returns the subscriptions setting in the format expected by the WC /settings REST API. + * + * @param array $setting Subscription setting. + * + * @return array|bool + */ + private function format_setting( $setting ) { + $description = ''; + + if ( ! empty( $setting['desc'] ) ) { + $description = $setting['desc']; + } elseif ( ! empty( $setting['description'] ) ) { + $description = $setting['description']; + } + + $new_setting = [ + 'id' => $setting['id'], + 'label' => ! empty( $setting['title'] ) ? $setting['title'] : '', + 'description' => $description, + 'type' => $setting['type'], + 'option_key' => $setting['id'], + 'default' => ! empty( $setting['default'] ) ? $setting['default'] : '', + ]; + + if ( isset( $setting['options'] ) ) { + $new_setting['options'] = $setting['options']; + } + + if ( isset( $setting['desc_tip'] ) ) { + if ( true === $setting['desc_tip'] ) { + $new_setting['tip'] = $description; + } elseif ( ! empty( $setting['desc_tip'] ) ) { + $new_setting['tip'] = $setting['desc_tip']; + } + } + + return $new_setting; + } +} diff --git a/includes/class-wcs-api.php b/includes/class-wcs-api.php index 88d97b9..cd349cb 100644 --- a/includes/class-wcs-api.php +++ b/includes/class-wcs-api.php @@ -75,6 +75,7 @@ class WCS_API { } WC_REST_Subscription_System_Status_Manager::init(); + new WC_REST_Subscriptions_Settings(); } /** diff --git a/includes/class-wcs-webhooks.php b/includes/class-wcs-webhooks.php index 9fa8f0c..1044835 100644 --- a/includes/class-wcs-webhooks.php +++ b/includes/class-wcs-webhooks.php @@ -79,10 +79,8 @@ class WCS_Webhooks { 'woocommerce_process_shop_subscription_meta', ), 'subscription.updated' => array( - 'wcs_api_subscription_updated', - 'woocommerce_subscription_status_changed', 'wcs_webhook_subscription_updated', - 'woocommerce_process_shop_subscription_meta', + 'woocommerce_update_subscription', ), 'subscription.deleted' => array( 'woocommerce_subscription_trashed', diff --git a/languages/woocommerce-subscriptions.pot b/languages/woocommerce-subscriptions.pot index 8b304b2..e0c089c 100644 --- a/languages/woocommerce-subscriptions.pot +++ b/languages/woocommerce-subscriptions.pot @@ -2,16 +2,16 @@ # This file is distributed under the same license as the Woo Subscriptions plugin. msgid "" msgstr "" -"Project-Id-Version: Woo Subscriptions 5.9.1\n" +"Project-Id-Version: Woo Subscriptions 6.0.0\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-01-17T02:51:06+00:00\n" +"POT-Creation-Date: 2024-02-08T06:42:10+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.8.1\n" "X-Domain: woocommerce-subscriptions\n" #. Plugin Name of the plugin @@ -48,6 +48,7 @@ msgstr "" #: includes/admin/class-wcs-admin-reports.php:81 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:922 +#: includes/api/class-wc-rest-subscriptions-settings.php:29 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1030 #: 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 @@ -1228,19 +1229,19 @@ msgstr "" msgid "Learn more" msgstr "" -#: includes/class-wcs-webhooks.php:110 +#: includes/class-wcs-webhooks.php:108 msgid " Subscription created" msgstr "" -#: includes/class-wcs-webhooks.php:111 +#: includes/class-wcs-webhooks.php:109 msgid " Subscription updated" msgstr "" -#: includes/class-wcs-webhooks.php:112 +#: includes/class-wcs-webhooks.php:110 msgid " Subscription deleted" msgstr "" -#: includes/class-wcs-webhooks.php:113 +#: includes/class-wcs-webhooks.php:111 msgid " Subscription switched" msgstr "" @@ -1886,6 +1887,46 @@ 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:291 +msgctxt "table heading" +msgid "Start Date" +msgstr "" + +#: tests/unit/scheduler/scheduler.php:66 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:292 +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:293 +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:294 +msgctxt "table heading" +msgid "Last Order Date" +msgstr "" + +#: tests/unit/scheduler/scheduler.php:69 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:295 +msgctxt "table heading" +msgid "Cancelled Date" +msgstr "" + +#: tests/unit/scheduler/scheduler.php:70 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:296 +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." @@ -2368,7 +2409,7 @@ msgstr "" #: 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/class-wc-subscriptions-manager.php:1937 -#: vendor/woocommerce/subscriptions-core/includes/wcs-user-functions.php:327 +#: vendor/woocommerce/subscriptions-core/includes/wcs-user-functions.php:329 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:78 msgctxt "an action on a subscription" msgid "Cancel" @@ -4082,20 +4123,20 @@ msgstr "" msgid "First payment: %s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:77 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:75 msgid "Related order caching is now handled by %1$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:84 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:82 msgid "Customer subscription caching is now handled by %1$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:108 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:106 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:238 msgid "Customer subscription caching is now handled by %1$s and %2$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:125 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:123 msgid "new related order methods in WCS_Related_Order_Store" msgstr "" @@ -5215,46 +5256,46 @@ msgid "Customers with a subscription are excluded from this setting." msgstr "" #. translators: placeholder is a list of version numbers (e.g. "1.3 & 1.4 & 1.5") -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:355 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:360 msgid "Database updated to version %s" msgstr "" #. translators: placeholder is number of upgraded subscriptions -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:363 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:368 msgctxt "used in the subscriptions upgrader" msgid "Marked %s subscription products as \"sold individually\"." msgstr "" #. translators: 1$: number of action scheduler hooks upgraded, 2$: "{execution_time}", will be replaced on front end with actual time -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:372 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:377 msgid "Migrated %1$s subscription related hooks to the new scheduler (in %2$s seconds)." msgstr "" #. translators: 1$: number of subscriptions upgraded, 2$: "{execution_time}", will be replaced on front end with actual time it took -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:384 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:389 msgid "Migrated %1$s subscriptions to the new structure (in %2$s seconds)." msgstr "" #. translators: placeholder is "{time_left}", will be replaced on front end with actual time -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:387 -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:433 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:392 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:438 msgctxt "Message that gets sent to front end." msgid "Estimated time left (minutes:seconds): %s" msgstr "" #. translators: 1$: error message, 2$: opening link tag, 3$: closing link tag, 4$: break tag -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:397 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:402 msgid "Unable to upgrade subscriptions.%4$sError: %1$s%4$sPlease refresh the page and try again. If problem persists, %2$scontact support%3$s." msgstr "" #. translators: placeholder is the number of subscriptions repaired -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:412 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:417 msgctxt "Repair message that gets sent to front end." msgid "Repaired %d subscriptions with incorrect dates, line tax data or missing customer notes." msgstr "" #. translators: placeholder is number of subscriptions that were checked and did not need repairs. There's a space at the beginning! -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:418 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:423 msgctxt "Repair message that gets sent to front end." msgid " %d other subscription was checked and did not need any repairs." msgid_plural "%d other subscriptions were checked and did not need any repairs." @@ -5262,38 +5303,38 @@ msgstr[0] "" msgstr[1] "" #. translators: placeholder is "{execution_time}", which will be replaced on front end with actual time -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:422 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:427 msgctxt "Repair message that gets sent to front end." msgid "(in %s seconds)" msgstr "" #. translators: $1: "Repaired x subs with incorrect dates...", $2: "X others were checked and no repair needed", $3: "(in X seconds)". Ordering for RTL languages. -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:425 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:430 msgctxt "The assembled repair message that gets sent to front end." msgid "%1$s%2$s %3$s" msgstr "" #. translators: 1$: error message, 2$: opening link tag, 3$: closing link tag, 4$: break tag -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:444 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:449 msgctxt "Error message that gets sent to front end when upgrading Subscriptions" msgid "Unable to repair subscriptions.%4$sError: %1$s%4$sPlease refresh the page and try again. If problem persists, %2$scontact support%3$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:648 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:653 msgid "Welcome to WooCommerce Subscriptions 2.1" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:648 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:653 msgid "About WooCommerce Subscriptions" msgstr "" #. translators: 1-2: opening/closing tags, 3-4: opening/closing tags linked to ticket form. -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:879 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:884 msgid "%1$sWarning!%2$s We discovered an issue in %1$sWooCommerce Subscriptions 2.3.0 - 2.3.2%2$s that may cause your subscription renewal order and customer subscription caches to contain invalid data. For information about how to update the cached data, please %3$sopen a new support ticket%4$s." msgstr "" #. translators: 1-2: opening/closing tags, 3: active version of Subscriptions, 4: current version of Subscriptions, 5-6: opening/closing tags linked to ticket form, 7-8: opening/closing tags linked to documentation. -#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:958 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:963 msgid "%1$sWarning!%2$s It appears that you have downgraded %1$sWooCommerce Subscriptions%2$s from %3$s to %4$s. Downgrading the plugin in this way may cause issues. Please update to %3$s or higher, or %5$sopen a new support ticket%6$s for further assistance. %7$sLearn more »%8$s" msgstr "" @@ -5814,15 +5855,15 @@ msgid "Continue" msgstr "" #. translators: $1: placeholder is number of weeks, 2$: path to the file -#: vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-upgrade.php:66 -msgid "To record the progress of the update a new log file was created. This file will be automatically deleted in %1$d weeks. If you would like to delete it sooner, you can find it here: %2$s" +#: vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-upgrade.php:74 +msgid "To record the progress of the update a new log file was created. This file will be automatically deleted in %1$d weeks. If you would like to delete it sooner, you can find it in the %2$sWooCommerce logs screen%3$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-upgrade.php:71 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-upgrade.php:79 msgid "Update Error" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-upgrade.php:72 +#: vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-upgrade.php:80 msgid "There was an error with the update. Please refresh the page and try again." msgstr "" @@ -6124,7 +6165,7 @@ msgctxt "no trial period" msgid "no" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/wcs-user-functions.php:318 +#: vendor/woocommerce/subscriptions-core/includes/wcs-user-functions.php:319 #: vendor/woocommerce/subscriptions-core/templates/single-product/add-to-cart/subscription.php:30 #: vendor/woocommerce/subscriptions-core/templates/single-product/add-to-cart/variable-subscription.php:28 msgid "Resubscribe" @@ -6203,20 +6244,20 @@ msgstr "" msgid "Create subscription product" msgstr "" -#: vendor/woocommerce/subscriptions-core/templates/admin/html-failed-scheduled-action-notice.php:21 +#: vendor/woocommerce/subscriptions-core/templates/admin/html-failed-scheduled-action-notice.php:26 msgid "An error has occurred while processing a recent subscription related event. For steps on how to fix the affected subscription and to learn more about the possible causes of this error, please read our guide %1$shere%2$s." msgid_plural "An error has occurred while processing recent subscription related events. For steps on how to fix the affected subscriptions and to learn more about the possible causes of this error, please read our guide %1$shere%2$s." msgstr[0] "" msgstr[1] "" -#: vendor/woocommerce/subscriptions-core/templates/admin/html-failed-scheduled-action-notice.php:31 +#: vendor/woocommerce/subscriptions-core/templates/admin/html-failed-scheduled-action-notice.php:36 msgid "Affected event:" msgid_plural "Affected events:" msgstr[0] "" msgstr[1] "" #. translators: $1 the log file name $2 and $3 are opening and closing link tags, respectively. -#: vendor/woocommerce/subscriptions-core/templates/admin/html-failed-scheduled-action-notice.php:38 +#: vendor/woocommerce/subscriptions-core/templates/admin/html-failed-scheduled-action-notice.php:43 msgid "To see further details about these errors, view the %1$s log file from the %2$sWooCommerce logs screen.%2$s" msgstr "" @@ -6367,14 +6408,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 +6690,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 @@ -6770,11 +6797,11 @@ msgstr "" msgid "Actions" msgstr "" -#: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-details.php:94 +#: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-details.php:101 msgid "Subscription updates" msgstr "" -#: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-details.php:100 +#: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-details.php:107 msgctxt "date on subscription updates list. Will be localized" msgid "l jS \\o\\f F Y, h:ia" msgstr "" @@ -6842,26 +6869,6 @@ msgstr "" 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 msgid "Date type is not a string." msgstr "" diff --git a/vendor/autoload.php b/vendor/autoload.php index cbbaad8..7026022 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit05910b6e6fdd55087b6b8fac1607afc2::getLoader(); +return ComposerAutoloaderInit355d724f37b9eb5e851f078727e57a07::getLoader(); diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index a72151c..7824d8f 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -45,35 +45,34 @@ class ClassLoader /** @var \Closure(string):void */ private static $includeFile; - /** @var ?string */ + /** @var string|null */ private $vendorDir; // PSR-4 /** - * @var array[] - * @psalm-var array> + * @var array> */ private $prefixLengthsPsr4 = array(); /** - * @var array[] - * @psalm-var array> + * @var array> */ private $prefixDirsPsr4 = array(); /** - * @var array[] - * @psalm-var array + * @var list */ private $fallbackDirsPsr4 = array(); // PSR-0 /** - * @var array[] - * @psalm-var array> + * List of PSR-0 prefixes + * + * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) + * + * @var array>> */ private $prefixesPsr0 = array(); /** - * @var array[] - * @psalm-var array + * @var list */ private $fallbackDirsPsr0 = array(); @@ -81,8 +80,7 @@ class ClassLoader private $useIncludePath = false; /** - * @var string[] - * @psalm-var array + * @var array */ private $classMap = array(); @@ -90,21 +88,20 @@ class ClassLoader private $classMapAuthoritative = false; /** - * @var bool[] - * @psalm-var array + * @var array */ private $missingClasses = array(); - /** @var ?string */ + /** @var string|null */ private $apcuPrefix; /** - * @var self[] + * @var array */ private static $registeredLoaders = array(); /** - * @param ?string $vendorDir + * @param string|null $vendorDir */ public function __construct($vendorDir = null) { @@ -113,7 +110,7 @@ class ClassLoader } /** - * @return string[] + * @return array> */ public function getPrefixes() { @@ -125,8 +122,7 @@ class ClassLoader } /** - * @return array[] - * @psalm-return array> + * @return array> */ public function getPrefixesPsr4() { @@ -134,8 +130,7 @@ class ClassLoader } /** - * @return array[] - * @psalm-return array + * @return list */ public function getFallbackDirs() { @@ -143,8 +138,7 @@ class ClassLoader } /** - * @return array[] - * @psalm-return array + * @return list */ public function getFallbackDirsPsr4() { @@ -152,8 +146,7 @@ class ClassLoader } /** - * @return string[] Array of classname => path - * @psalm-return array + * @return array Array of classname => path */ public function getClassMap() { @@ -161,8 +154,7 @@ class ClassLoader } /** - * @param string[] $classMap Class to filename map - * @psalm-param array $classMap + * @param array $classMap Class to filename map * * @return void */ @@ -179,24 +171,25 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, either * appending or prepending to the ones previously set for this prefix. * - * @param string $prefix The prefix - * @param string[]|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories * * @return void */ public function add($prefix, $paths, $prepend = false) { + $paths = (array) $paths; if (!$prefix) { if ($prepend) { $this->fallbackDirsPsr0 = array_merge( - (array) $paths, + $paths, $this->fallbackDirsPsr0 ); } else { $this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0, - (array) $paths + $paths ); } @@ -205,19 +198,19 @@ class ClassLoader $first = $prefix[0]; if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; + $this->prefixesPsr0[$first][$prefix] = $paths; return; } if ($prepend) { $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, + $paths, $this->prefixesPsr0[$first][$prefix] ); } else { $this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix], - (array) $paths + $paths ); } } @@ -226,9 +219,9 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, either * appending or prepending to the ones previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param string[]|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException * @@ -236,17 +229,18 @@ class ClassLoader */ public function addPsr4($prefix, $paths, $prepend = false) { + $paths = (array) $paths; if (!$prefix) { // Register directories for the root namespace. if ($prepend) { $this->fallbackDirsPsr4 = array_merge( - (array) $paths, + $paths, $this->fallbackDirsPsr4 ); } else { $this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4, - (array) $paths + $paths ); } } elseif (!isset($this->prefixDirsPsr4[$prefix])) { @@ -256,18 +250,18 @@ class ClassLoader throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; + $this->prefixDirsPsr4[$prefix] = $paths; } elseif ($prepend) { // Prepend directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, + $paths, $this->prefixDirsPsr4[$prefix] ); } else { // Append directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix], - (array) $paths + $paths ); } } @@ -276,8 +270,8 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, * replacing any others previously set for this prefix. * - * @param string $prefix The prefix - * @param string[]|string $paths The PSR-0 base directories + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 base directories * * @return void */ @@ -294,8 +288,8 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, * replacing any others previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param string[]|string $paths The PSR-4 base directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException * @@ -481,9 +475,9 @@ class ClassLoader } /** - * Returns the currently registered loaders indexed by their corresponding vendor directories. + * Returns the currently registered loaders keyed by their corresponding vendor directories. * - * @return self[] + * @return array */ public static function getRegisteredLoaders() { diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 8411e6d..8fa819b 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit05910b6e6fdd55087b6b8fac1607afc2 +class ComposerAutoloaderInit355d724f37b9eb5e851f078727e57a07 { private static $loader; @@ -24,12 +24,12 @@ class ComposerAutoloaderInit05910b6e6fdd55087b6b8fac1607afc2 require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInit05910b6e6fdd55087b6b8fac1607afc2', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit355d724f37b9eb5e851f078727e57a07', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit05910b6e6fdd55087b6b8fac1607afc2', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit355d724f37b9eb5e851f078727e57a07', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit05910b6e6fdd55087b6b8fac1607afc2::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit355d724f37b9eb5e851f078727e57a07::getInitializer($loader)); $loader->register(true); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 8730f8b..8e77d5f 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit05910b6e6fdd55087b6b8fac1607afc2 +class ComposerStaticInit355d724f37b9eb5e851f078727e57a07 { public static $prefixLengthsPsr4 = array ( 'C' => @@ -129,9 +129,9 @@ class ComposerStaticInit05910b6e6fdd55087b6b8fac1607afc2 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit05910b6e6fdd55087b6b8fac1607afc2::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit05910b6e6fdd55087b6b8fac1607afc2::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit05910b6e6fdd55087b6b8fac1607afc2::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit355d724f37b9eb5e851f078727e57a07::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit355d724f37b9eb5e851f078727e57a07::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit355d724f37b9eb5e851f078727e57a07::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index e32ec3a..8289bc2 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -156,17 +156,17 @@ }, { "name": "woocommerce/subscriptions-core", - "version": "6.7.1", - "version_normalized": "6.7.1.0", + "version": "6.8.0", + "version_normalized": "6.8.0.0", "source": { "type": "git", "url": "https://github.com/Automattic/woocommerce-subscriptions-core.git", - "reference": "81d809a476e87c260492d4cc0413818d85e123cc" + "reference": "19d4f2acf246c7f8275438c9356eb79a141bdf4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/81d809a476e87c260492d4cc0413818d85e123cc", - "reference": "81d809a476e87c260492d4cc0413818d85e123cc", + "url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/19d4f2acf246c7f8275438c9356eb79a141bdf4d", + "reference": "19d4f2acf246c7f8275438c9356eb79a141bdf4d", "shasum": "" }, "require": { @@ -179,7 +179,7 @@ "woocommerce/woocommerce-sniffs": "0.1.0", "yoast/phpunit-polyfills": "1.1.0" }, - "time": "2024-01-17T01:56:28+00:00", + "time": "2024-02-08T06:17:51+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/6.7.1", + "source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/6.8.0", "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 3cbf775..60b0db7 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,9 +1,9 @@ array( 'name' => 'woocommerce/woocommerce-subscriptions', - 'pretty_version' => 'dev-release/5.9.1', - 'version' => 'dev-release/5.9.1', - 'reference' => '2f40fcd6696f5e7ebfecbb96d06001167970d953', + 'pretty_version' => 'dev-release/6.0.0', + 'version' => 'dev-release/6.0.0', + 'reference' => 'b739a4cf35dc85bdd84a335c27295258c480fc4e', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -32,18 +32,18 @@ ), ), 'woocommerce/subscriptions-core' => array( - 'pretty_version' => '6.7.1', - 'version' => '6.7.1.0', - 'reference' => '81d809a476e87c260492d4cc0413818d85e123cc', + 'pretty_version' => '6.8.0', + 'version' => '6.8.0.0', + 'reference' => '19d4f2acf246c7f8275438c9356eb79a141bdf4d', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../woocommerce/subscriptions-core', 'aliases' => array(), 'dev_requirement' => false, ), 'woocommerce/woocommerce-subscriptions' => array( - 'pretty_version' => 'dev-release/5.9.1', - 'version' => 'dev-release/5.9.1', - 'reference' => '2f40fcd6696f5e7ebfecbb96d06001167970d953', + 'pretty_version' => 'dev-release/6.0.0', + 'version' => 'dev-release/6.0.0', + 'reference' => 'b739a4cf35dc85bdd84a335c27295258c480fc4e', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/vendor/woocommerce/subscriptions-core/assets/js/frontend/view-subscription.js b/vendor/woocommerce/subscriptions-core/assets/js/frontend/view-subscription.js index 557b0b9..9d41793 100644 --- a/vendor/woocommerce/subscriptions-core/assets/js/frontend/view-subscription.js +++ b/vendor/woocommerce/subscriptions-core/assets/js/frontend/view-subscription.js @@ -149,10 +149,21 @@ jQuery( function ( $ ) { return $paymentMethod.data( 'is_manual' ) === 'no'; } + function blockActionsOnTrigger() { + $( '.subscription_details' ).block( { + message: null, + overlayCSS: { + background: '#fff', + opacity: 0.6, + }, + } ); + } + $toggle.on( 'click', onToggle ); maybeApplyColor(); displayToggle(); $early_renewal_modal_submit.on( 'click', blockEarlyRenewalModal ); $( document ).on( 'wcs_show_modal', shouldShowEarlyRenewalModal ); + $( document ).on( 'click', '.wcs_block_ui_on_click', blockActionsOnTrigger ); } ); diff --git a/vendor/woocommerce/subscriptions-core/changelog.txt b/vendor/woocommerce/subscriptions-core/changelog.txt index 7353e41..d9045c7 100644 --- a/vendor/woocommerce/subscriptions-core/changelog.txt +++ b/vendor/woocommerce/subscriptions-core/changelog.txt @@ -1,5 +1,9 @@ *** WooCommerce Subscriptions Core Changelog *** += 6.8.0 - 2024-02-08 = +* Fix - Block the UI after a customer clicks actions on the My Account > Subscriptions page to prevent multiple requests from being sent. +* Fix - WC 8.6.0 compatibility: Resolved wc_get_log_file_path() deprecation warnings. + = 6.7.1 - 2024-01-17 = * Fix - Resolved an error that would occur with WC 8.5.0 when editing a subscription customer from the admin dashboard. 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 d6504ca..18a06df 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 = '6.7.1'; // WRCS: DEFINED_VERSION. + protected $library_version = '6.8.0'; // WRCS: DEFINED_VERSION. /** * The subscription scheduler instance. diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php index 040a61f..134794d 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php @@ -18,8 +18,6 @@ class WCS_Cached_Data_Manager extends WCS_Cache_Manager { public function __construct() { add_action( 'woocommerce_loaded', array( $this, 'load_logger' ) ); - - add_action( 'admin_init', array( $this, 'initialize_cron_check_size' ) ); // setup cron task to truncate big logs. add_filter( 'cron_schedules', array( $this, 'add_weekly_cron_schedule' ) ); // create a weekly cron schedule } @@ -168,6 +166,7 @@ class WCS_Cached_Data_Manager extends WCS_Cache_Manager { * truncated to 0 bytes. */ public static function cleanup_logs() { + wcs_deprecated_function( __METHOD__, '6.0.0' ); $file = wc_get_log_file_path( 'wcs-cache' ); $max_cache_size = apply_filters( 'wcs_max_log_size', 50 * 1024 * 1024 ); @@ -199,6 +198,7 @@ class WCS_Cached_Data_Manager extends WCS_Cache_Manager { * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.2.9 */ public function initialize_cron_check_size() { + wcs_deprecated_function( __METHOD__, '6.0.0' ); $hook = 'wcs_cleanup_big_logs'; diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-initial-cart-stock-manager.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-initial-cart-stock-manager.php index 84546eb..fbb4f20 100644 --- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-initial-cart-stock-manager.php +++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-initial-cart-stock-manager.php @@ -66,7 +66,7 @@ class WCS_Initial_Cart_Stock_Manager extends WCS_Renewal_Cart_Stock_Manager { if ( isset( $wp->query_vars['order-pay'] ) ) { $order = wc_get_order( $wp->query_vars['order-pay'] ); - if ( static::has_handled_stock( $order ) && wcs_order_contains_subscription( $order, 'parent' ) ) { + if ( $order && static::has_handled_stock( $order ) && wcs_order_contains_subscription( $order, 'parent' ) ) { $parent_order = $order; } } 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 9bbc6d2..b310c21 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 @@ -263,6 +263,11 @@ class WC_Subscriptions_Upgrader { WCS_Upgrade_3_1_0::migrate_subscription_webhooks_using_api_version_3(); } + if ( version_compare( self::$active_version, '6.8.0', '<' ) ) { + // Upon upgrading to 6.8.0 delete the 'wcs_cleanup_big_logs' WP Cron job that is no longer used. + wp_unschedule_hook( 'wcs_cleanup_big_logs' ); + } + self::upgrade_complete(); } diff --git a/vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-upgrade.php b/vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-upgrade.php index 39154b8..66ee026 100644 --- a/vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-upgrade.php +++ b/vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-upgrade.php @@ -62,8 +62,16 @@ if ( ! defined( 'ABSPATH' ) ) {

' . esc_html( wc_get_log_file_path( WCS_Upgrade_Logger::$handle ) ) . '' ), array( 'code' => array( 'class' => true ) ) ); + echo wp_kses_post( sprintf( __( 'To record the progress of the update a new log file was created. This file will be automatically deleted in %1$d weeks. If you would like to delete it sooner, you can find it in the %2$sWooCommerce logs screen%3$s.', 'woocommerce-subscriptions' ), esc_html( WCS_Upgrade_Logger::$weeks_until_cleanup ), '', '' ) ); ?>

diff --git a/vendor/woocommerce/subscriptions-core/includes/wcs-user-functions.php b/vendor/woocommerce/subscriptions-core/includes/wcs-user-functions.php index 7cce6fd..5abe6cd 100644 --- a/vendor/woocommerce/subscriptions-core/includes/wcs-user-functions.php +++ b/vendor/woocommerce/subscriptions-core/includes/wcs-user-functions.php @@ -307,15 +307,17 @@ function wcs_get_all_user_actions_for_subscription( $subscription, $user_id ) { if ( $subscription->can_be_updated_to( 'active' ) && ! $subscription->needs_payment() ) { $actions['reactivate'] = array( - 'url' => wcs_get_users_change_status_link( $subscription->get_id(), 'active', $current_status ), - 'name' => __( 'Reactivate', 'woocommerce-subscriptions' ), + 'url' => wcs_get_users_change_status_link( $subscription->get_id(), 'active', $current_status ), + 'name' => __( 'Reactivate', 'woocommerce-subscriptions' ), + 'block_ui' => true, ); } if ( wcs_can_user_resubscribe_to( $subscription, $user_id ) && false == $subscription->can_be_updated_to( 'active' ) ) { $actions['resubscribe'] = array( - 'url' => wcs_get_users_resubscribe_link( $subscription ), - 'name' => __( 'Resubscribe', 'woocommerce-subscriptions' ), + 'url' => wcs_get_users_resubscribe_link( $subscription ), + 'name' => __( 'Resubscribe', 'woocommerce-subscriptions' ), + 'block_ui' => true, ); } @@ -323,8 +325,9 @@ function wcs_get_all_user_actions_for_subscription( $subscription, $user_id ) { $next_payment = $subscription->get_time( 'next_payment' ); if ( $subscription->can_be_updated_to( 'cancelled' ) && ( ! $subscription->is_one_payment() && ( $subscription->has_status( 'on-hold' ) && empty( $next_payment ) ) || $next_payment > 0 ) ) { $actions['cancel'] = array( - 'url' => wcs_get_users_change_status_link( $subscription->get_id(), 'cancelled', $current_status ), - 'name' => _x( 'Cancel', 'an action on a subscription', 'woocommerce-subscriptions' ), + 'url' => wcs_get_users_change_status_link( $subscription->get_id(), 'cancelled', $current_status ), + 'name' => _x( 'Cancel', 'an action on a subscription', 'woocommerce-subscriptions' ), + 'block_ui' => true, ); } } diff --git a/vendor/woocommerce/subscriptions-core/templates/admin/html-failed-scheduled-action-notice.php b/vendor/woocommerce/subscriptions-core/templates/admin/html-failed-scheduled-action-notice.php index d3339bf..ff69ba3 100644 --- a/vendor/woocommerce/subscriptions-core/templates/admin/html-failed-scheduled-action-notice.php +++ b/vendor/woocommerce/subscriptions-core/templates/admin/html-failed-scheduled-action-notice.php @@ -12,6 +12,11 @@ if ( ! defined( 'ABSPATH' ) ) { // Get the log file URL depending on the log handler (file or database). $url = admin_url( sprintf( 'admin.php?page=wc-status&tab=logs&log_file=%s-%s-log', 'failed-scheduled-actions', sanitize_file_name( wp_hash( 'failed-scheduled-actions' ) ) ) ); +// In WC 8.6 the URL format changed to include the source parameter. +if ( ! wcs_is_woocommerce_pre( '8.6.0' ) ) { + $url = admin_url( sprintf( 'admin.php?page=wc-status&tab=logs&source=%s&paged=1', 'failed-scheduled-actions' ) ); +} + if ( defined( 'WC_LOG_HANDLER' ) && 'WC_Log_Handler_DB' === WC_LOG_HANDLER ) { $url = admin_url( sprintf( 'admin.php?page=wc-status&tab=logs&source=%s', 'failed-scheduled-actions' ) ); } diff --git a/vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-details.php b/vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-details.php index 4017707..81015ed 100644 --- a/vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-details.php +++ b/vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-details.php @@ -81,7 +81,14 @@ if ( ! defined( 'ABSPATH' ) ) { $action ) : ?> - + + + + + diff --git a/vendor/woocommerce/subscriptions-core/woocommerce-subscriptions-core.php b/vendor/woocommerce/subscriptions-core/woocommerce-subscriptions-core.php index 8dea0f6..7916bf1 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: 6.7.1 + * Version: 6.8.0 */ diff --git a/woocommerce-subscriptions.php b/woocommerce-subscriptions.php index d84ab9b..b8e34a3 100644 --- a/woocommerce-subscriptions.php +++ b/woocommerce-subscriptions.php @@ -5,7 +5,7 @@ * Description: Sell products and services with recurring payments in your WooCommerce Store. * Author: WooCommerce * Author URI: https://woocommerce.com/ - * Version: 5.9.1 + * Version: 6.0.0 * * WC requires at least: 7.7.0 * WC tested up to: 8.2.0 @@ -77,7 +77,7 @@ class WC_Subscriptions { public static $plugin_file = __FILE__; /** @var string */ - public static $version = '5.9.1'; // WRCS: DEFINED_VERSION. + public static $version = '6.0.0'; // WRCS: DEFINED_VERSION. /** @var string */ public static $wc_minimum_supported_version = '7.7';