From d3348c6c8fa4cec0c3c01591d4405a42daae0dbd Mon Sep 17 00:00:00 2001
From: WooCommerce
Date: Thu, 28 Mar 2024 10:12:12 +0000
Subject: [PATCH] Updates to 6.1.0
---
changelog.txt | 16 +++
includes/class-wc-subscriptions-plugin.php | 4 +-
...lass-wc-subscriptions-payment-gateways.php | 25 +++-
languages/woocommerce-subscriptions.pot | 133 +++++++++---------
vendor/autoload.php | 2 +-
vendor/composer/autoload_real.php | 8 +-
vendor/composer/autoload_static.php | 8 +-
vendor/composer/installed.json | 14 +-
vendor/composer/installed.php | 18 +--
.../subscriptions-core/assets/css/admin.css | 88 ++++++++----
.../assets/js/admin/admin.js | 21 +--
.../assets/js/frontend/payment-methods.js | 15 +-
.../subscriptions-core/build/index.asset.php | 2 +-
.../subscriptions-core/build/index.js | 4 +-
.../subscriptions-core/changelog.txt | 13 ++
.../class-wcs-meta-box-subscription-data.php | 5 +
.../class-wc-subscriptions-core-plugin.php | 44 +++++-
.../includes/class-wc-subscriptions-order.php | 62 +++++++-
.../class-wc-subscriptions-synchroniser.php | 8 +-
.../includes/class-wcs-blocks-integration.php | 33 +++++
.../includes/class-wcs-cart-renewal.php | 2 +-
.../includes/class-wcs-payment-tokens.php | 7 +-
...s-orders-table-subscription-data-store.php | 5 +
...ypal-reference-transaction-api-request.php | 4 +-
...s-wcs-paypal-reference-transaction-api.php | 12 ++
.../admin/html-variation-synchronisation.php | 14 +-
.../checkout/form-change-payment-method.php | 16 +--
.../add-to-cart/subscription.php | 15 +-
.../woocommerce-subscriptions-core.php | 2 +-
woocommerce-subscriptions.php | 6 +-
30 files changed, 423 insertions(+), 183 deletions(-)
diff --git a/changelog.txt b/changelog.txt
index 018f1ab..218dea7 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,10 +1,26 @@
*** Woo Subscriptions Changelog ***
+2024-03-28 - version 6.1.0
+* Fix: Ensure the subscription renewal payment process doesn't attempt to reprocess previously paid renewal orders.
+* Fix: Resolved an issue where discounts, when reapplied to failed or manual subscription order payments, would incorrectly account for inclusive tax.
+* Fix: Resolved an issue that could cause an empty error notice to appear on the My Account > Payment methods page when a customer attempted to delete a token used by subscriptions.
+* Fix: Make sure we always clear the subscription object from cache after updating dates.
+* Fix: Use block theme styles for the 'Add to Cart' button on subscription product pages.
+* Fix: Customer notes not being saved on the Edit Subscription page for stores with HPOS enabled.
+* Fix: Ensure products that have a yearly billing period can choose a date that the subscription is synchronized to.
+* Fix: Improved alignment of subscription product pricing fields on the edit product screen for consistency with other fields.
+* Fix: Avoid setting empty meta keys on subscriptions when changing the customer's default payment method.
+* Fix: Use a more scalable way to filter the orders admin list table by parent orders on HPOS stores.
+* Fix: Resolved an issue that prevented subscription custom place order button labels from working on the block checkout.
+* Update: Change the update all subscriptions checkbox displayed on the change payment method page to be enabled by default.
+* Dev: Update subscriptions-core to 6.9.0
+
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.
+* Dev: Update subscriptions-core to 6.8.0
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/class-wc-subscriptions-plugin.php b/includes/class-wc-subscriptions-plugin.php
index 7cdbb9f..fa932f0 100644
--- a/includes/class-wc-subscriptions-plugin.php
+++ b/includes/class-wc-subscriptions-plugin.php
@@ -21,7 +21,7 @@ class WC_Subscriptions_Plugin extends WC_Subscriptions_Core_Plugin {
public function init() {
parent::init();
WC_Subscriptions_Switcher::init();
- new WCS_Cart_Switch();
+ $this->add_cart_handler( new WCS_Cart_Switch() );
WCS_Manual_Renewal_Manager::init();
WCS_Customer_Suspension_Manager::init();
WCS_Drip_Downloads_Manager::init();
@@ -72,7 +72,7 @@ class WC_Subscriptions_Plugin extends WC_Subscriptions_Core_Plugin {
require_once $this->get_plugin_directory( 'includes/early-renewal/wcs-early-renewal-functions.php' );
if ( WCS_Early_Renewal_Manager::is_early_renewal_enabled() ) {
- new WCS_Cart_Early_Renewal();
+ $this->add_cart_handler( new WCS_Cart_Early_Renewal() );
}
}
}
diff --git a/includes/gateways/class-wc-subscriptions-payment-gateways.php b/includes/gateways/class-wc-subscriptions-payment-gateways.php
index 8bfcc7e..cfef7bb 100644
--- a/includes/gateways/class-wc-subscriptions-payment-gateways.php
+++ b/includes/gateways/class-wc-subscriptions-payment-gateways.php
@@ -77,8 +77,29 @@ class WC_Subscriptions_Payment_Gateways extends WC_Subscriptions_Core_Payment_Ga
throw new InvalidArgumentException( sprintf( __( 'Subscription doesn\'t exist in scheduled action: %d', 'woocommerce-subscriptions' ), $subscription_id ) );
}
+ // If the subscription's payment method uses gateway scheduled payments, don't process the payment here. The gateway will handle it.
+ if ( $subscription->payment_method_supports( 'gateway_scheduled_payments' ) ) {
+ return;
+ }
+
if ( ! $subscription->is_manual() && ! $subscription->has_status( wcs_get_subscription_ended_statuses() ) ) {
- self::trigger_gateway_renewal_payment_hook( $subscription->get_last_order( 'all', 'renewal' ) );
+ $latest_renewal_order = $subscription->get_last_order( 'all', 'renewal' );
+
+ if ( empty( $latest_renewal_order ) ) {
+ return;
+ }
+
+ if ( $latest_renewal_order->needs_payment() ) {
+ self::trigger_gateway_renewal_payment_hook( $latest_renewal_order );
+ } elseif ( $latest_renewal_order->get_total() > 0 ) {
+ $subscription->add_order_note(
+ sprintf(
+ /* Translators: placeholder is a subscription renewal order ID as a link */
+ __( 'Payment processing of the renewal order %s was skipped because it is already paid.', 'woocommerce_subscriptions' ),
+ '' . _x( '#', 'hash before order number', 'woocommerce' ) . $latest_renewal_order->get_order_number() . ''
+ )
+ );
+ }
}
}
@@ -91,7 +112,7 @@ class WC_Subscriptions_Payment_Gateways extends WC_Subscriptions_Core_Payment_Ga
public static function trigger_gateway_renewal_payment_hook( $renewal_order ) {
if ( ! empty( $renewal_order ) && $renewal_order->get_total() > 0 && $renewal_order->get_payment_method() ) {
- // Make sure gateways are setup
+ // Make sure gateways are setup.
WC()->payment_gateways();
do_action( 'woocommerce_scheduled_subscription_payment_' . $renewal_order->get_payment_method(), $renewal_order->get_total(), $renewal_order );
diff --git a/languages/woocommerce-subscriptions.pot b/languages/woocommerce-subscriptions.pot
index e0c089c..a82d1bc 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 6.0.0\n"
+"Project-Id-Version: Woo Subscriptions 6.1.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-02-08T06:42:10+00:00\n"
+"POT-Creation-Date: 2024-03-28T06:13:35+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"X-Generator: WP-CLI 2.8.1\n"
+"X-Generator: WP-CLI 2.10.0\n"
"X-Domain: woocommerce-subscriptions\n"
#. Plugin Name of the plugin
@@ -54,8 +54,8 @@ msgstr ""
#: 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/class-wc-subscriptions-core-plugin.php:336
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:349
+#: 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
#: vendor/woocommerce/subscriptions-core/includes/class-wcs-query.php:133
#: vendor/woocommerce/subscriptions-core/includes/class-wcs-query.php:289
@@ -1029,7 +1029,7 @@ msgid "Add a Subscription Product"
msgstr ""
#: includes/class-wc-subscriptions-plugin.php:223
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:512
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:548
#: vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-about-2-0.php:35
#: vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-about.php:34
msgid "Settings"
@@ -1390,7 +1390,7 @@ msgid "Subscription doesn't exist in scheduled action: %d"
msgstr ""
#. translators: $1-$2: opening and closing tags. Link to documents->payment gateways, 3$-4$: opening and closing tags. Link to WooCommerce extensions shop page
-#: includes/gateways/class-wc-subscriptions-payment-gateways.php:129
+#: includes/gateways/class-wc-subscriptions-payment-gateways.php:150
msgid "Find new gateways that %1$ssupport automatic subscription payments%2$s in the official %3$sWooCommerce Marketplace%4$s."
msgstr ""
@@ -2140,7 +2140,7 @@ msgid "Manage Subscriptions"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1008
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:345
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:381
msgid "Search Subscriptions"
msgstr ""
@@ -2442,7 +2442,7 @@ msgid "Status"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:463
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:337
+#: 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
#: vendor/woocommerce/subscriptions-core/templates/emails/on-hold-subscription.php:21
@@ -2900,13 +2900,13 @@ msgid "Customer's notes about the order"
msgstr ""
#. translators: %s: parent order number (linked to its details screen).
-#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:425
+#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:430
msgctxt "subscription note after linking to a parent order"
msgid "Subscription linked to parent order %s via admin."
msgstr ""
#. translators: placeholder is error message from the payment gateway or subscriptions when updating the status
-#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:440
+#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:445
msgid "Error updating some information: %s"
msgstr ""
@@ -3343,53 +3343,53 @@ msgstr ""
msgid "Purchasing a subscription product requires an account. Please go to the %1$sMy Account%2$s page to login or contact us if you need assistance."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:338
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:374
msgctxt "custom post type setting"
msgid "Add Subscription"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:339
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:375
msgctxt "custom post type setting"
msgid "Add New Subscription"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:340
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:376
msgctxt "custom post type setting"
msgid "Edit"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:341
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:377
msgctxt "custom post type setting"
msgid "Edit Subscription"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:342
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:378
msgctxt "custom post type setting"
msgid "New Subscription"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:343
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:344
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:379
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:380
msgctxt "custom post type setting"
msgid "View Subscription"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:347
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:383
msgctxt "custom post type setting"
msgid "No Subscriptions found in trash"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:348
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:384
msgctxt "custom post type setting"
msgid "Parent Subscriptions"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:351
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:387
msgid "This is where subscriptions are stored."
msgstr ""
#. translators: placeholder is a post count.
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:409
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:445
msgctxt "post status label including post count"
msgid "Active (%s)"
msgid_plural "Active (%s)"
@@ -3397,7 +3397,7 @@ msgstr[0] ""
msgstr[1] ""
#. translators: placeholder is a post count.
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:411
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:447
msgctxt "post status label including post count"
msgid "Switched (%s)"
msgid_plural "Switched (%s)"
@@ -3405,7 +3405,7 @@ msgstr[0] ""
msgstr[1] ""
#. translators: placeholder is a post count.
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:413
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:449
msgctxt "post status label including post count"
msgid "Expired (%s)"
msgid_plural "Expired (%s)"
@@ -3413,29 +3413,29 @@ msgstr[0] ""
msgstr[1] ""
#. translators: placeholder is a post count.
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:415
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:451
msgctxt "post status label including post count"
msgid "Pending Cancellation (%s)"
msgid_plural "Pending Cancellation (%s)"
msgstr[0] ""
msgstr[1] ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:464
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:500
msgid "Variable Subscription"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:513
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:549
#: vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-about-2-0.php:36
msgctxt "short for documents"
msgid "Docs"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:514
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:550
msgid "Support"
msgstr ""
#. translators: placeholders are opening and closing tags. Leads to docs on version 2
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:537
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:573
msgid "Warning! Version 2.0 is a major update to the WooCommerce Subscriptions extension. Before updating, please create a backup, update all WooCommerce extensions and test all plugins, custom code and payment gateways with version 2.0 on a staging site. %1$sLearn more about the changes in version 2.0 »%2$s"
msgstr ""
@@ -3841,75 +3841,75 @@ msgstr ""
msgid "Date Changed"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:345
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:347
msgid "Your subscription will be activated when payment clears."
msgid_plural "Your subscriptions will be activated when payment clears."
msgstr[0] ""
msgstr[1] ""
#. translators: placeholders are opening and closing link tags
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:352
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:354
msgid "View the status of your subscription in %1$syour account%2$s."
msgid_plural "View the status of your subscriptions in %1$syour account%2$s."
msgstr[0] ""
msgstr[1] ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:415
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:417
msgid "Subscription Relationship"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:498
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:517
msgid "Payment completed on order after subscription was cancelled."
msgstr ""
#. translators: $1: opening link tag, $2: order number, $3: closing link tag
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:1060
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:1085
msgid "Subscription cancelled for refunded order %1$s#%2$s%3$s."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2327
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2381
msgctxt "An order type"
msgid "Original"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2328
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2382
msgctxt "An order type"
msgid "Subscription Parent"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2329
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2383
msgctxt "An order type"
msgid "Subscription Renewal"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2330
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2384
msgctxt "An order type"
msgid "Subscription Resubscribe"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2331
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2385
msgctxt "An order type"
msgid "Subscription Switch"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2332
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2386
msgctxt "An order type"
msgid "Non-subscription"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2341
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2395
msgid "All orders types"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2368
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2422
msgid "Renewal Order"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2370
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2424
msgid "Resubscribe Order"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2372
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2426
msgid "Parent Order"
msgstr ""
@@ -4083,43 +4083,36 @@ msgstr ""
msgid "Month for Synchronisation"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:315
-#: vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-synchronisation.php:36
-#: vendor/woocommerce/subscriptions-core/templates/admin/html-variation-synchronisation.php:42
-msgctxt "input field placeholder for day field for annual subscriptions"
-msgid "Day"
-msgstr ""
-
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:746
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:763
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:752
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:769
msgid "Do not synchronise"
msgstr ""
#. translators: placeholder is a day of the week
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:771
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:777
msgid "%s each week"
msgstr ""
#. translators: placeholder is a number of day with language specific suffix applied (e.g. "1st", "3rd", "5th", etc...)
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:777
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:783
msgid "%s day of the month"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:779
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:785
msgid "Last day of the month"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:827
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:833
msgid "Today!"
msgstr ""
#. translators: placeholder is a date
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:834
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:840
msgid "First payment prorated. Next payment: %s"
msgstr ""
#. translators: placeholder is a date
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:837
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-synchroniser.php:843
msgid "First payment: %s"
msgstr ""
@@ -6166,7 +6159,7 @@ msgid "no"
msgstr ""
#: 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/subscription.php:29
#: vendor/woocommerce/subscriptions-core/templates/single-product/add-to-cart/variable-subscription.php:28
msgid "Resubscribe"
msgstr ""
@@ -6215,6 +6208,12 @@ msgstr ""
msgid "Synchronise Renewals"
msgstr ""
+#: vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-synchronisation.php:36
+#: vendor/woocommerce/subscriptions-core/templates/admin/html-variation-synchronisation.php:42
+msgctxt "input field placeholder for day field for annual subscriptions"
+msgid "Day"
+msgstr ""
+
#: vendor/woocommerce/subscriptions-core/templates/admin/deprecated/order-shipping-html.php:8
msgid "Label"
msgstr ""
@@ -6286,30 +6285,30 @@ msgstr ""
msgid "There are no shipping methods available. Please double check your address, or contact us if you need any help."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php:20
+#: 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
msgctxt "table headings in notification email"
msgid "Product"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php:21
+#: vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php:20
#: vendor/woocommerce/subscriptions-core/templates/emails/email-order-details.php:37
msgctxt "table headings in notification email"
msgid "Quantity"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php:22
+#: vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php:21
msgctxt "table headings in notification email"
msgid "Totals"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php:47
+#: vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php:46
msgctxt "text on button on checkout page"
msgid "Change payment method"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php:49
+#: vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php:48
msgctxt "text on button on checkout page"
msgid "Add payment method"
msgstr ""
@@ -6320,7 +6319,7 @@ msgstr ""
#. translators: $1: opening tag, $2: closing tag
#: vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php:92
-msgid "Update the payment method used for %1$sall%2$s of my current subscriptions"
+msgid "Use this payment method for %1$sall%2$s of my current subscriptions"
msgstr ""
#: vendor/woocommerce/subscriptions-core/templates/checkout/recurring-subscription-totals.php:18
@@ -6814,7 +6813,7 @@ msgstr ""
msgid "Subscription totals"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/single-product/add-to-cart/subscription.php:32
+#: vendor/woocommerce/subscriptions-core/templates/single-product/add-to-cart/subscription.php:31
#: vendor/woocommerce/subscriptions-core/templates/single-product/add-to-cart/variable-subscription.php:30
msgid "You have an active subscription to this product already."
msgstr ""
diff --git a/vendor/autoload.php b/vendor/autoload.php
index 7026022..e5e0b2d 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 ComposerAutoloaderInit355d724f37b9eb5e851f078727e57a07::getLoader();
+return ComposerAutoloaderInite5f25043b4323431d48e7e46b04aa2c9::getLoader();
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index 8fa819b..f9ecb29 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
-class ComposerAutoloaderInit355d724f37b9eb5e851f078727e57a07
+class ComposerAutoloaderInite5f25043b4323431d48e7e46b04aa2c9
{
private static $loader;
@@ -24,12 +24,12 @@ class ComposerAutoloaderInit355d724f37b9eb5e851f078727e57a07
require __DIR__ . '/platform_check.php';
- spl_autoload_register(array('ComposerAutoloaderInit355d724f37b9eb5e851f078727e57a07', 'loadClassLoader'), true, true);
+ spl_autoload_register(array('ComposerAutoloaderInite5f25043b4323431d48e7e46b04aa2c9', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
- spl_autoload_unregister(array('ComposerAutoloaderInit355d724f37b9eb5e851f078727e57a07', 'loadClassLoader'));
+ spl_autoload_unregister(array('ComposerAutoloaderInite5f25043b4323431d48e7e46b04aa2c9', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
- call_user_func(\Composer\Autoload\ComposerStaticInit355d724f37b9eb5e851f078727e57a07::getInitializer($loader));
+ call_user_func(\Composer\Autoload\ComposerStaticInite5f25043b4323431d48e7e46b04aa2c9::getInitializer($loader));
$loader->register(true);
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 8e77d5f..3aae124 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -4,7 +4,7 @@
namespace Composer\Autoload;
-class ComposerStaticInit355d724f37b9eb5e851f078727e57a07
+class ComposerStaticInite5f25043b4323431d48e7e46b04aa2c9
{
public static $prefixLengthsPsr4 = array (
'C' =>
@@ -129,9 +129,9 @@ class ComposerStaticInit355d724f37b9eb5e851f078727e57a07
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
- $loader->prefixLengthsPsr4 = ComposerStaticInit355d724f37b9eb5e851f078727e57a07::$prefixLengthsPsr4;
- $loader->prefixDirsPsr4 = ComposerStaticInit355d724f37b9eb5e851f078727e57a07::$prefixDirsPsr4;
- $loader->classMap = ComposerStaticInit355d724f37b9eb5e851f078727e57a07::$classMap;
+ $loader->prefixLengthsPsr4 = ComposerStaticInite5f25043b4323431d48e7e46b04aa2c9::$prefixLengthsPsr4;
+ $loader->prefixDirsPsr4 = ComposerStaticInite5f25043b4323431d48e7e46b04aa2c9::$prefixDirsPsr4;
+ $loader->classMap = ComposerStaticInite5f25043b4323431d48e7e46b04aa2c9::$classMap;
}, null, ClassLoader::class);
}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 8289bc2..752ab41 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -156,17 +156,17 @@
},
{
"name": "woocommerce/subscriptions-core",
- "version": "6.8.0",
- "version_normalized": "6.8.0.0",
+ "version": "6.9.0",
+ "version_normalized": "6.9.0.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/woocommerce-subscriptions-core.git",
- "reference": "19d4f2acf246c7f8275438c9356eb79a141bdf4d"
+ "reference": "baf73669ba923b544aec87421282b753e277171f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/19d4f2acf246c7f8275438c9356eb79a141bdf4d",
- "reference": "19d4f2acf246c7f8275438c9356eb79a141bdf4d",
+ "url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/baf73669ba923b544aec87421282b753e277171f",
+ "reference": "baf73669ba923b544aec87421282b753e277171f",
"shasum": ""
},
"require": {
@@ -179,7 +179,7 @@
"woocommerce/woocommerce-sniffs": "0.1.0",
"yoast/phpunit-polyfills": "1.1.0"
},
- "time": "2024-02-08T06:17:51+00:00",
+ "time": "2024-03-28T05:12:56+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.8.0",
+ "source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/6.9.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 60b0db7..cef6f2e 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -1,9 +1,9 @@
array(
'name' => 'woocommerce/woocommerce-subscriptions',
- 'pretty_version' => 'dev-release/6.0.0',
- 'version' => 'dev-release/6.0.0',
- 'reference' => 'b739a4cf35dc85bdd84a335c27295258c480fc4e',
+ 'pretty_version' => 'dev-release/6.1.0',
+ 'version' => 'dev-release/6.1.0',
+ 'reference' => 'a609ac6f082f5fff09d0059eebcc48aa11229f58',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -32,18 +32,18 @@
),
),
'woocommerce/subscriptions-core' => array(
- 'pretty_version' => '6.8.0',
- 'version' => '6.8.0.0',
- 'reference' => '19d4f2acf246c7f8275438c9356eb79a141bdf4d',
+ 'pretty_version' => '6.9.0',
+ 'version' => '6.9.0.0',
+ 'reference' => 'baf73669ba923b544aec87421282b753e277171f',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../woocommerce/subscriptions-core',
'aliases' => array(),
'dev_requirement' => false,
),
'woocommerce/woocommerce-subscriptions' => array(
- 'pretty_version' => 'dev-release/6.0.0',
- 'version' => 'dev-release/6.0.0',
- 'reference' => 'b739a4cf35dc85bdd84a335c27295258c480fc4e',
+ 'pretty_version' => 'dev-release/6.1.0',
+ 'version' => 'dev-release/6.1.0',
+ 'reference' => 'a609ac6f082f5fff09d0059eebcc48aa11229f58',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
diff --git a/vendor/woocommerce/subscriptions-core/assets/css/admin.css b/vendor/woocommerce/subscriptions-core/assets/css/admin.css
index 1f30e6a..913d38b 100644
--- a/vendor/woocommerce/subscriptions-core/assets/css/admin.css
+++ b/vendor/woocommerce/subscriptions-core/assets/css/admin.css
@@ -77,6 +77,28 @@ a.close-subscriptions-search {
display: block;
width: 50%;
}
+/* Variation Subscription Product Sync Settings */
+.variable_subscription_sync .subscription_sync_annual > .select2-container {
+ max-width: 48%;
+}
+.variable_subscription_sync .subscription_sync_annual > .select2-container:last-child {
+ float: right;
+}
+#woocommerce-product-data .variable_subscription_pricing ._subscription_length_field .wc_input_subscription_length + .select2,
+#woocommerce-product-data .variable_subscription_sync .subscription_sync_week_month .wc_input_subscription_payment_sync + .select2 {
+ width: 100% !important;
+}
+/* Simple Subscription Product Sync Settings */
+._subscription_trial_length_field .select2-container:last-child,
+#general_product_data .subscription_sync_annual .select2-container:last-child {
+ width: 45% !important;
+ margin-left: 5%;
+}
+._subscription_trial_length_field .select2-container:not( :last-child ),
+#general_product_data .subscription_sync_annual .select2-container:not( :last-child ) {
+ width: 50% !important;
+}
+
@media only screen and ( max-width: 1280px ) {
.woocommerce_options_panel ._subscription_price_fields .wrap,
.woocommerce_options_panel ._subscription_trial_length_field .wrap,
@@ -88,11 +110,9 @@ a.close-subscriptions-search {
}
.woocommerce_options_panel ._subscription_price_fields .wrap input,
.woocommerce_options_panel ._subscription_price_fields .wrap select {
- width: 30.75%;
- margin-right: 3.8%;
+ width: 30%;
+ margin-right: 5%;
}
-.woocommerce_options_panel ._subscription_trial_length_field .wrap input,
-.woocommerce_options_panel ._subscription_trial_length_field .wrap select,
.woocommerce_options_panel
._subscription_payment_sync_date_day_field
.wrap
@@ -301,23 +321,25 @@ a.close-subscriptions-search {
width: auto !important;
}
-.wc_input_subscription_payment_sync +.select2,
-.wc_input_subscription_length +.select2,
+#woocommerce-product-data .wc_input_subscription_length +.select2,
+#woocommerce-product-data .wc_input_subscription_payment_sync +.select2,
#_subscription_limit +.select2 {
- min-width: 180px;
- width: 80% !important;
+ width: 50% !important;
margin-bottom: 4px;
}
-.wc_input_subscription_period + .select2,
+.wc_input_subscription_period + .select2 {
+ width: 30% !important;
+ margin-top: 0;
+}
.wc_input_subscription_trial_period + .select2 {
- width: 30.75% !important;
+ width: 50% !important;
margin-top: 0;
}
-.wc_input_subscription_period_interval + .select2 {
- margin-right: 3.8%;
- width: 30.75% !important;
+#general_product_data .wc_input_subscription_period_interval + .select2 {
+ margin-right: 5%;
+ width: 30% !important;
}
.variable_subscription_sync p._subscription_payment_sync_field {
@@ -363,31 +385,38 @@ a.close-subscriptions-search {
.wc_input_subscription_price,
#variable_product_options
.variable_subscription_pricing_2_3
- .wc_input_subscription_period_interval {
- max-width: 33%;
+ .wc_input_subscription_period + .select2,
+#variable_product_options
+ .variable_subscription_pricing_2_3
+ .wc_input_subscription_period_interval + .select2 {
+ width: calc( 100% / 3 ) !important;
float: left;
- margin-right: 2px;
}
-
-#variable_product_options .select2 {
- margin: 2px 2px 0 0;
+#variable_product_options
+ .variable_subscription_pricing_2_3
+ .wc_input_subscription_period + .select2,
+#variable_product_options
+ .variable_subscription_pricing_2_3
+ .wc_input_subscription_period_interval + .select2 {
+ padding-bottom: 2px;
+ margin-top: 2px;
}
#variable_product_options
- .select2-container
+ .select2-container
.select2-selection--single {
min-height: 40px;
}
-#variable_product_options
- .select2-container
- .select2-selection--single
+#variable_product_options
+ .select2-container
+ .select2-selection--single
.select2-selection__rendered {
line-height: 36px;
}
-#variable_product_options
- .select2-container
- .select2-selection--single
+#variable_product_options
+ .select2-container
+ .select2-selection--single
.select2-selection__arrow {
height: 36px;
}
@@ -406,13 +435,14 @@ a.close-subscriptions-search {
}
#variable_product_options
.variable_subscription_pricing_2_3
- .wc_input_subscription_trial_period,
+ .wc_input_subscription_trial_period + .select2,
#variable_product_options
.variable_subscription_pricing_2_3
.wc_input_subscription_trial_length {
- max-width: 50%;
+ width: 50%;
}
-.variable_subscription_pricing_2_3 .wc_input_subscription_trial_period {
+.variable_subscription_pricing_2_3 .wc_input_subscription_trial_period + .select2 {
+ margin-top: 2px;
float: right;
}
.variable_subscription_pricing_2_3 .variable_subscription_length,
diff --git a/vendor/woocommerce/subscriptions-core/assets/js/admin/admin.js b/vendor/woocommerce/subscriptions-core/assets/js/admin/admin.js
index b21a474..8c54c93 100644
--- a/vendor/woocommerce/subscriptions-core/assets/js/admin/admin.js
+++ b/vendor/woocommerce/subscriptions-core/assets/js/admin/admin.js
@@ -708,16 +708,21 @@ jQuery( function ( $ ) {
);
if ( 0 < $( this ).val() ) {
- $syncDayOfMonthInput
- .val( 1 )
- .attr( {
- step: '1',
- min: '1',
- max: $.daysInMonth( $( this ).val() ),
- } )
- .prop( 'disabled', false );
+ // Clear existing options.
+ $syncDayOfMonthInput.empty();
+
+ // Add options for each day in the month.
+ for ( var day = 1; day <= $.daysInMonth( $( this ).val() ); day++ ) {
+ $syncDayOfMonthInput.append( $( '';
+ }
+ ?>
+
'active',
+ 'place_order_override' => $this->get_place_order_button_text_override(),
);
}
@@ -97,4 +98,36 @@ class WCS_Blocks_Integration implements IntegrationInterface {
}
return \WC_Subscriptions_Core_Plugin::instance()->get_library_version();
}
+
+ /**
+ * Fetches the place order button text if it has been overridden by one of Woo Subscription's methods.
+ *
+ * @return string|null The overridden place order button text or null if it hasn't been overridden.
+ */
+ protected function get_place_order_button_text_override() {
+ $default = null;
+ $order_button_text = $default;
+
+ // Check if any of our button text override functions (hooked onto 'woocommerce_order_button_text') change the default text.
+ $callbacks = [
+ [ 'WC_Subscriptions_Checkout', 'order_button_text' ],
+ [ \WC_Subscriptions_Core_Plugin::instance()->get_cart_handler( 'WCS_Cart_Renewal' ), 'order_button_text' ],
+ [ \WC_Subscriptions_Core_Plugin::instance()->get_cart_handler( 'WCS_Cart_Switch' ), 'order_button_text' ],
+ [ \WC_Subscriptions_Core_Plugin::instance()->get_cart_handler( 'WCS_Cart_Resubscribe' ), 'order_button_text' ],
+ ];
+
+ foreach ( $callbacks as $callback ) {
+ if ( ! is_callable( $callback ) ) {
+ continue;
+ }
+
+ $order_button_text = call_user_func( $callback, $default );
+
+ if ( $order_button_text !== $default ) {
+ break;
+ }
+ }
+
+ return $order_button_text;
+ }
}
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 5af1a33..ab37f01 100644
--- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php
+++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php
@@ -1360,7 +1360,7 @@ class WCS_Cart_Renewal {
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.4.3
*/
public function setup_discounts( $order ) {
- $order_discount = $order->get_total_discount();
+ $order_discount = $order->get_total_discount( ! $order->get_prices_include_tax() );
$coupon_items = $order->get_items( 'coupon' );
if ( empty( $order_discount ) && empty( $coupon_items ) ) {
diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-payment-tokens.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-payment-tokens.php
index 93fd6f1..b0fd08f 100644
--- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-payment-tokens.php
+++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-payment-tokens.php
@@ -30,23 +30,20 @@ class WCS_Payment_Tokens extends WC_Payment_Tokens {
public static function update_subscription_token( $subscription, $new_token, $old_token ) {
$token_payment_gateway = $old_token->get_gateway_id();
$payment_meta_table = self::get_subscription_payment_meta( $subscription, $token_payment_gateway );
- $token_meta_key = '';
// Attempt to find the token meta key from the subscription payment meta and the old token.
if ( is_array( $payment_meta_table ) ) {
foreach ( $payment_meta_table as $meta ) {
foreach ( $meta as $meta_key => $meta_data ) {
if ( $old_token->get_token() === $meta_data['value'] ) {
- $token_meta_key = $meta_key;
+ $subscription->update_meta_data( $meta_key, $new_token->get_token() );
+ $subscription->save();
break 2;
}
}
}
}
- $subscription->update_meta_data( $token_meta_key, $new_token->get_token() );
- $subscription->save();
-
// Copy the new token to the last renewal order if it needs payment so the retry system will pick up the new method.
$last_renewal_order = $subscription->get_last_order( 'all', 'renewal' );
diff --git a/vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-orders-table-subscription-data-store.php b/vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-orders-table-subscription-data-store.php
index 76ac9a6..c715af9 100644
--- a/vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-orders-table-subscription-data-store.php
+++ b/vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-orders-table-subscription-data-store.php
@@ -796,6 +796,11 @@ class WCS_Orders_Table_Subscription_Data_Store extends \Automattic\WooCommerce\I
$dates_saved[ $date_prop ] = wcs_get_datetime_from( $subscription->get_time( $date_type ) );
}
+ // If dates were saved, clear the caches.
+ if ( ! empty( $dates_saved ) ) {
+ $this->clear_caches( $subscription );
+ }
+
return $dates_saved;
}
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 6dc52b8..021d17b 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
@@ -695,11 +695,11 @@ class WCS_PayPal_Reference_Transaction_API_Request {
* Format prices.
*
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.2.12
- * @param float|int $price
+ * @param float|int|null $price
* @param int $decimals Optional. The number of decimal points.
* @return string
*/
private function price_format( $price, $decimals = 2 ) {
- return number_format( $price, $decimals, '.', '' );
+ return number_format( (float) $price, $decimals, '.', '' );
}
}
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 9f90a1e..6357f32 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
@@ -36,6 +36,18 @@ class WCS_PayPal_Reference_Transaction_API extends WCS_SV_API_Base {
/** @var array the request parameters */
private $parameters = array();
+ /** @var string */
+ public $gateway_id;
+
+ /** @var string */
+ public $api_username;
+
+ /** @var string */
+ public $api_password;
+
+ /** @var string */
+ public $api_signature;
+
/**
* Constructor - setup request object and set endpoint
*
diff --git a/vendor/woocommerce/subscriptions-core/templates/admin/html-variation-synchronisation.php b/vendor/woocommerce/subscriptions-core/templates/admin/html-variation-synchronisation.php
index 43ed32e..1159bfa 100644
--- a/vendor/woocommerce/subscriptions-core/templates/admin/html-variation-synchronisation.php
+++ b/vendor/woocommerce/subscriptions-core/templates/admin/html-variation-synchronisation.php
@@ -34,12 +34,16 @@ global $wp_locale;
+
+
-
- />
diff --git a/vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php b/vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php
index 1b307aa..e0c8b08 100644
--- a/vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php
+++ b/vendor/woocommerce/subscriptions-core/templates/checkout/form-change-payment-method.php
@@ -3,7 +3,6 @@
* Pay for order form displayed after a customer has clicked the "Change Payment method" button
* next to a subscription on their My Account page.
*
- * @author Prospress
* @package WooCommerce/Templates
* @version 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0
*/
@@ -52,8 +51,9 @@ if ( ! defined( 'ABSPATH' ) ) {
$pay_order_button_text = apply_filters( 'woocommerce_change_payment_button_text', $pay_order_button_text );
$customer_subscription_ids = WCS_Customer_Store::instance()->get_users_subscription_ids( $subscription->get_customer_id() );
$payment_gateways_handler = WC_Subscriptions_Core_Plugin::instance()->get_gateways_handler_class();
+ $available_gateways = WC()->payment_gateways->get_available_payment_gateways();
- if ( $available_gateways = WC()->payment_gateways->get_available_payment_gateways() ) :
+ if ( $available_gateways ) :
?>
tag, $2: closing tag
- $label = sprintf( esc_html__( 'Update the payment method used for %1$sall%2$s of my current subscriptions', 'woocommerce-subscriptions' ), '', '' );
+ $label = sprintf( esc_html__( 'Use this payment method for %1$sall%2$s of my current subscriptions', 'woocommerce-subscriptions' ), '', '' );
woocommerce_form_field(
'update_all_subscriptions_payment_method',
array(
- 'type' => 'checkbox',
- 'class' => array( 'form-row-wide' ),
- 'label' => $label,
- 'default' => apply_filters( 'wcs_update_all_subscriptions_payment_method_checked', false ),
+ 'type' => 'checkbox',
+ 'class' => array( 'form-row-wide' ),
+ 'label' => $label,
+ 'required' => true, // Making the field required to help make it more prominent on the page.
+ 'default' => apply_filters( 'wcs_update_all_subscriptions_payment_method_checked', true ),
)
);
?>
-
diff --git a/vendor/woocommerce/subscriptions-core/templates/single-product/add-to-cart/subscription.php b/vendor/woocommerce/subscriptions-core/templates/single-product/add-to-cart/subscription.php
index f7f2b19..80622e5 100644
--- a/vendor/woocommerce/subscriptions-core/templates/single-product/add-to-cart/subscription.php
+++ b/vendor/woocommerce/subscriptions-core/templates/single-product/add-to-cart/subscription.php
@@ -2,7 +2,6 @@
/**
* Subscription Product Add to Cart
*
- * @author Prospress
* @package WooCommerce-Subscriptions/Templates
* @version 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0
*/
@@ -39,16 +38,18 @@ if ( $product->is_in_stock() ) : ?>
apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ),
- 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ),
- 'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( wp_unslash( $_POST['quantity'] ) ) : $product->get_min_purchase_quantity(), // WPCS: CSRF ok, input var ok.
- ) );
+ woocommerce_quantity_input(
+ [
+ 'min_value' => apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ),
+ 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ),
+ 'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( wp_unslash( $_POST['quantity'] ) ) : $product->get_min_purchase_quantity(), // phpcs:ignore WordPress.Security.NonceVerification.Missing -- input var ok.
+ ]
+ );
do_action( 'woocommerce_after_add_to_cart_quantity' );
?>
-
+
diff --git a/vendor/woocommerce/subscriptions-core/woocommerce-subscriptions-core.php b/vendor/woocommerce/subscriptions-core/woocommerce-subscriptions-core.php
index 7916bf1..3e9a3b6 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.8.0
+ * Version: 6.9.0
*/
diff --git a/woocommerce-subscriptions.php b/woocommerce-subscriptions.php
index b8e34a3..93b1c65 100644
--- a/woocommerce-subscriptions.php
+++ b/woocommerce-subscriptions.php
@@ -5,10 +5,10 @@
* Description: Sell products and services with recurring payments in your WooCommerce Store.
* Author: WooCommerce
* Author URI: https://woocommerce.com/
- * Version: 6.0.0
+ * Version: 6.1.0
*
* WC requires at least: 7.7.0
- * WC tested up to: 8.2.0
+ * WC tested up to: 8.7.0
* Woo: 27147:6115e6d7e297b623a169fdcf5728b224
*
* Copyright 2019 WooCommerce
@@ -77,7 +77,7 @@ class WC_Subscriptions {
public static $plugin_file = __FILE__;
/** @var string */
- public static $version = '6.0.0'; // WRCS: DEFINED_VERSION.
+ public static $version = '6.1.0'; // WRCS: DEFINED_VERSION.
/** @var string */
public static $wc_minimum_supported_version = '7.7';