Updates to 5.3.0

This commit is contained in:
WooCommerce
2023-07-19 10:12:08 +00:00
parent c9162747ee
commit fc69aacd2f
17 changed files with 311 additions and 163 deletions

View File

@@ -1,5 +1,12 @@
*** WooCommerce Subscriptions Changelog *** *** WooCommerce Subscriptions Changelog ***
2023-07-19 - version 5.3.0
* Fix: Ensure when a customer changes the shipping method on cart and checkout that the recurring totals correctly reflect the chosen method.
* Fix: Resolve an issue that prevented the "Used for variations" checkbox from being enabled on the variable subscription product edit screen on WC version v7.9.0.
* Fix: When HPOS is enabled, the `wc/v3/subscriptions` REST API endpoint will now fetch subscriptions of all statuses.
* Dev: Filter the WC_Order_Query args to properly query subscription statuses when HPOS is enabled.
* Dev: Updated subscriptions-core to 6.0.0
2023-07-05 - version 5.2.0 2023-07-05 - version 5.2.0
* Fix: Resolved an issue that prevented the selected Shipping Method from being saved when switching an assembled Product Bundle. * Fix: Resolved an issue that prevented the selected Shipping Method from being saved when switching an assembled Product Bundle.
* Fix: When HPOS is enabled, permanently deleting a subscription related order wasn't updating the related orders cache properly. * Fix: When HPOS is enabled, permanently deleting a subscription related order wasn't updating the related orders cache properly.

View File

@@ -2,16 +2,16 @@
# This file is distributed under the same license as the WooCommerce Subscriptions plugin. # This file is distributed under the same license as the WooCommerce Subscriptions plugin.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WooCommerce Subscriptions 5.2.0\n" "Project-Id-Version: WooCommerce Subscriptions 5.3.0\n"
"Report-Msgid-Bugs-To: https://woocommerce.com/contact-us\n" "Report-Msgid-Bugs-To: https://woocommerce.com/contact-us\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2023-07-05T05:07:01+00:00\n" "POT-Creation-Date: 2023-07-19T03:29:55+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.8.0\n" "X-Generator: WP-CLI 2.8.1\n"
"X-Domain: woocommerce-subscriptions\n" "X-Domain: woocommerce-subscriptions\n"
#. Plugin Name of the plugin #. Plugin Name of the plugin
@@ -1871,6 +1871,46 @@ msgstr ""
msgid "Want to renew early via the checkout? Click %shere.%s" msgid "Want to renew early via the checkout? Click %shere.%s"
msgstr "" 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. #. translators: 1: relation type, 2: list of valid relation types.
#: vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-related-order-store.php:148 #: 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." msgid "Invalid relation type: %1$s. Order relationship type must be one of: %2$s."
@@ -3787,75 +3827,75 @@ msgstr ""
msgid "Date Changed" msgid "Date Changed"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:334 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:336
msgid "Your subscription will be activated when payment clears." msgid "Your subscription will be activated when payment clears."
msgid_plural "Your subscriptions will be activated when payment clears." msgid_plural "Your subscriptions will be activated when payment clears."
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#. translators: placeholders are opening and closing link tags #. translators: placeholders are opening and closing link tags
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:341 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:343
msgid "View the status of your subscription in %1$syour account%2$s." 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." msgid_plural "View the status of your subscriptions in %1$syour account%2$s."
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:404 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:406
msgid "Subscription Relationship" msgid "Subscription Relationship"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:424 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:426
msgid "Renewal Order" msgid "Renewal Order"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:426 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:428
msgid "Resubscribe Order" msgid "Resubscribe Order"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:428 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:430
msgid "Parent Order" msgid "Parent Order"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:477 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:479
msgid "Payment completed on order after subscription was cancelled." msgid "Payment completed on order after subscription was cancelled."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:713 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:715
msgid "All orders types" msgid "All orders types"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:716
msgctxt "An order type"
msgid "Original"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:717
msgctxt "An order type"
msgid "Subscription Parent"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:718 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:718
msgctxt "An order type" msgctxt "An order type"
msgid "Subscription Renewal" msgid "Original"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:719 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:719
msgctxt "An order type" msgctxt "An order type"
msgid "Subscription Resubscribe" msgid "Subscription Parent"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:720 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:720
msgctxt "An order type" msgctxt "An order type"
msgid "Subscription Switch" msgid "Subscription Renewal"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:721 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:721
msgctxt "An order type" msgctxt "An order type"
msgid "Subscription Resubscribe"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:722
msgctxt "An order type"
msgid "Subscription Switch"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:723
msgctxt "An order type"
msgid "Non-subscription" msgid "Non-subscription"
msgstr "" msgstr ""
#. translators: $1: opening link tag, $2: order number, $3: closing link tag #. translators: $1: opening link tag, $2: order number, $3: closing link tag
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:1024 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:1026
msgid "Subscription cancelled for refunded order %1$s#%2$s%3$s." msgid "Subscription cancelled for refunded order %1$s#%2$s%3$s."
msgstr "" msgstr ""
@@ -5800,27 +5840,27 @@ msgstr ""
msgid "Shipping via %s" msgid "Shipping via %s"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/wcs-cart-functions.php:237 #: vendor/woocommerce/subscriptions-core/includes/wcs-cart-functions.php:264
msgctxt "shipping method price" msgctxt "shipping method price"
msgid "Free" msgid "Free"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/wcs-cart-functions.php:262 #: vendor/woocommerce/subscriptions-core/includes/wcs-cart-functions.php:289
msgid "[Remove]" msgid "[Remove]"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/wcs-cart-functions.php:292 #: vendor/woocommerce/subscriptions-core/includes/wcs-cart-functions.php:319
msgid "Free shipping coupon" msgid "Free shipping coupon"
msgstr "" msgstr ""
#. translators: placeholder is price string, denotes tax included in cart/order total #. translators: placeholder is price string, denotes tax included in cart/order total
#: vendor/woocommerce/subscriptions-core/includes/wcs-cart-functions.php:330 #: vendor/woocommerce/subscriptions-core/includes/wcs-cart-functions.php:357
msgctxt "includes tax" msgctxt "includes tax"
msgid "(includes %s)" msgid "(includes %s)"
msgstr "" msgstr ""
#. translators: placeholder is a date #. translators: placeholder is a date
#: vendor/woocommerce/subscriptions-core/includes/wcs-cart-functions.php:405 #: vendor/woocommerce/subscriptions-core/includes/wcs-cart-functions.php:432
msgid "First renewal: %s" msgid "First renewal: %s"
msgstr "" msgstr ""
@@ -5984,11 +6024,11 @@ msgstr ""
msgid "\"%s\" is not a valid new order type." msgid "\"%s\" is not a valid new order type."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:542 #: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:526
msgid "Invalid data. No valid subscription / order was passed in." msgid "Invalid data. No valid subscription / order was passed in."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:546 #: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:530
msgid "Invalid data. No valid item id was passed in." msgid "Invalid data. No valid item id was passed in."
msgstr "" msgstr ""
@@ -6328,14 +6368,6 @@ msgctxt "table headings in notification email"
msgid "Price" msgid "Price"
msgstr "" 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 #: vendor/woocommerce/subscriptions-core/templates/emails/cancelled-subscription.php:24
msgctxt "table headings in notification email" msgctxt "table headings in notification email"
msgid "End of Prepaid Term" msgid "End of Prepaid Term"
@@ -6618,12 +6650,6 @@ msgstr ""
msgid "ID" msgid "ID"
msgstr "" 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/my-subscriptions.php:46
#: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:53 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:53
#: vendor/woocommerce/subscriptions-core/templates/myaccount/related-subscriptions.php:42 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-subscriptions.php:42
@@ -6803,26 +6829,6 @@ msgstr ""
msgid "Can not get address type display name. Address type is not a string." msgid "Can not get address type display name. Address type is not a string."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/wcs-functions.php:291
msgctxt "table heading"
msgid "Start Date"
msgstr ""
#: vendor/woocommerce/subscriptions-core/wcs-functions.php:292
msgctxt "table heading"
msgid "Trial End"
msgstr ""
#: vendor/woocommerce/subscriptions-core/wcs-functions.php:295
msgctxt "table heading"
msgid "Cancelled Date"
msgstr ""
#: vendor/woocommerce/subscriptions-core/wcs-functions.php:296
msgctxt "table heading"
msgid "End Date"
msgstr ""
#: vendor/woocommerce/subscriptions-core/wcs-functions.php:331 #: vendor/woocommerce/subscriptions-core/wcs-functions.php:331
msgid "Date type is not a string." msgid "Date type is not a string."
msgstr "" msgstr ""

2
vendor/autoload.php vendored
View File

@@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit33a9fa1eb707ddafd4d5a1bd7f21492d::getLoader(); return ComposerAutoloaderInit1ae0d000312c743ada5d59e74eb795da::getLoader();

View File

@@ -45,35 +45,34 @@ class ClassLoader
/** @var \Closure(string):void */ /** @var \Closure(string):void */
private static $includeFile; private static $includeFile;
/** @var ?string */ /** @var string|null */
private $vendorDir; private $vendorDir;
// PSR-4 // PSR-4
/** /**
* @var array[] * @var array<string, array<string, int>>
* @psalm-var array<string, array<string, int>>
*/ */
private $prefixLengthsPsr4 = array(); private $prefixLengthsPsr4 = array();
/** /**
* @var array[] * @var array<string, list<string>>
* @psalm-var array<string, array<int, string>>
*/ */
private $prefixDirsPsr4 = array(); private $prefixDirsPsr4 = array();
/** /**
* @var array[] * @var list<string>
* @psalm-var array<string, string>
*/ */
private $fallbackDirsPsr4 = array(); private $fallbackDirsPsr4 = array();
// PSR-0 // PSR-0
/** /**
* @var array[] * List of PSR-0 prefixes
* @psalm-var array<string, array<string, string[]>> *
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/ */
private $prefixesPsr0 = array(); private $prefixesPsr0 = array();
/** /**
* @var array[] * @var list<string>
* @psalm-var array<string, string>
*/ */
private $fallbackDirsPsr0 = array(); private $fallbackDirsPsr0 = array();
@@ -81,8 +80,7 @@ class ClassLoader
private $useIncludePath = false; private $useIncludePath = false;
/** /**
* @var string[] * @var array<string, string>
* @psalm-var array<string, string>
*/ */
private $classMap = array(); private $classMap = array();
@@ -90,21 +88,20 @@ class ClassLoader
private $classMapAuthoritative = false; private $classMapAuthoritative = false;
/** /**
* @var bool[] * @var array<string, bool>
* @psalm-var array<string, bool>
*/ */
private $missingClasses = array(); private $missingClasses = array();
/** @var ?string */ /** @var string|null */
private $apcuPrefix; private $apcuPrefix;
/** /**
* @var self[] * @var array<string, self>
*/ */
private static $registeredLoaders = array(); private static $registeredLoaders = array();
/** /**
* @param ?string $vendorDir * @param string|null $vendorDir
*/ */
public function __construct($vendorDir = null) public function __construct($vendorDir = null)
{ {
@@ -113,7 +110,7 @@ class ClassLoader
} }
/** /**
* @return string[] * @return array<string, list<string>>
*/ */
public function getPrefixes() public function getPrefixes()
{ {
@@ -125,8 +122,7 @@ class ClassLoader
} }
/** /**
* @return array[] * @return array<string, list<string>>
* @psalm-return array<string, array<int, string>>
*/ */
public function getPrefixesPsr4() public function getPrefixesPsr4()
{ {
@@ -134,8 +130,7 @@ class ClassLoader
} }
/** /**
* @return array[] * @return list<string>
* @psalm-return array<string, string>
*/ */
public function getFallbackDirs() public function getFallbackDirs()
{ {
@@ -143,8 +138,7 @@ class ClassLoader
} }
/** /**
* @return array[] * @return list<string>
* @psalm-return array<string, string>
*/ */
public function getFallbackDirsPsr4() public function getFallbackDirsPsr4()
{ {
@@ -152,8 +146,7 @@ class ClassLoader
} }
/** /**
* @return string[] Array of classname => path * @return array<string, string> Array of classname => path
* @psalm-return array<string, string>
*/ */
public function getClassMap() public function getClassMap()
{ {
@@ -161,8 +154,7 @@ class ClassLoader
} }
/** /**
* @param string[] $classMap Class to filename map * @param array<string, string> $classMap Class to filename map
* @psalm-param array<string, string> $classMap
* *
* @return void * @return void
*/ */
@@ -180,23 +172,24 @@ class ClassLoader
* appending or prepending to the ones previously set for this prefix. * appending or prepending to the ones previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories * @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
* *
* @return void * @return void
*/ */
public function add($prefix, $paths, $prepend = false) public function add($prefix, $paths, $prepend = false)
{ {
$paths = (array) $paths;
if (!$prefix) { if (!$prefix) {
if ($prepend) { if ($prepend) {
$this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0 = array_merge(
(array) $paths, $paths,
$this->fallbackDirsPsr0 $this->fallbackDirsPsr0
); );
} else { } else {
$this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0, $this->fallbackDirsPsr0,
(array) $paths $paths
); );
} }
@@ -205,19 +198,19 @@ class ClassLoader
$first = $prefix[0]; $first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) { if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths; $this->prefixesPsr0[$first][$prefix] = $paths;
return; return;
} }
if ($prepend) { if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths, $paths,
$this->prefixesPsr0[$first][$prefix] $this->prefixesPsr0[$first][$prefix]
); );
} else { } else {
$this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix], $this->prefixesPsr0[$first][$prefix],
(array) $paths $paths
); );
} }
} }
@@ -227,7 +220,7 @@ class ClassLoader
* appending or prepending to the ones previously set for this namespace. * appending or prepending to the ones previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories * @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
@@ -236,17 +229,18 @@ class ClassLoader
*/ */
public function addPsr4($prefix, $paths, $prepend = false) public function addPsr4($prefix, $paths, $prepend = false)
{ {
$paths = (array) $paths;
if (!$prefix) { if (!$prefix) {
// Register directories for the root namespace. // Register directories for the root namespace.
if ($prepend) { if ($prepend) {
$this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4 = array_merge(
(array) $paths, $paths,
$this->fallbackDirsPsr4 $this->fallbackDirsPsr4
); );
} else { } else {
$this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4, $this->fallbackDirsPsr4,
(array) $paths $paths
); );
} }
} elseif (!isset($this->prefixDirsPsr4[$prefix])) { } 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."); throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
} }
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths; $this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) { } elseif ($prepend) {
// Prepend directories for an already registered namespace. // Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths, $paths,
$this->prefixDirsPsr4[$prefix] $this->prefixDirsPsr4[$prefix]
); );
} else { } else {
// Append directories for an already registered namespace. // Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix], $this->prefixDirsPsr4[$prefix],
(array) $paths $paths
); );
} }
} }
@@ -277,7 +271,7 @@ class ClassLoader
* replacing any others previously set for this prefix. * replacing any others previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories * @param list<string>|string $paths The PSR-0 base directories
* *
* @return void * @return void
*/ */
@@ -295,7 +289,7 @@ class ClassLoader
* replacing any others previously set for this namespace. * replacing any others previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories * @param list<string>|string $paths The PSR-4 base directories
* *
* @throws \InvalidArgumentException * @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<string, self>
*/ */
public static function getRegisteredLoaders() public static function getRegisteredLoaders()
{ {

View File

@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit33a9fa1eb707ddafd4d5a1bd7f21492d class ComposerAutoloaderInit1ae0d000312c743ada5d59e74eb795da
{ {
private static $loader; private static $loader;
@@ -24,12 +24,12 @@ class ComposerAutoloaderInit33a9fa1eb707ddafd4d5a1bd7f21492d
require __DIR__ . '/platform_check.php'; require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit33a9fa1eb707ddafd4d5a1bd7f21492d', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit1ae0d000312c743ada5d59e74eb795da', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit33a9fa1eb707ddafd4d5a1bd7f21492d', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit1ae0d000312c743ada5d59e74eb795da', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit33a9fa1eb707ddafd4d5a1bd7f21492d::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInit1ae0d000312c743ada5d59e74eb795da::getInitializer($loader));
$loader->register(true); $loader->register(true);

View File

@@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInit33a9fa1eb707ddafd4d5a1bd7f21492d class ComposerStaticInit1ae0d000312c743ada5d59e74eb795da
{ {
public static $prefixLengthsPsr4 = array ( public static $prefixLengthsPsr4 = array (
'C' => 'C' =>
@@ -129,9 +129,9 @@ class ComposerStaticInit33a9fa1eb707ddafd4d5a1bd7f21492d
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit33a9fa1eb707ddafd4d5a1bd7f21492d::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInit1ae0d000312c743ada5d59e74eb795da::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit33a9fa1eb707ddafd4d5a1bd7f21492d::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit1ae0d000312c743ada5d59e74eb795da::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit33a9fa1eb707ddafd4d5a1bd7f21492d::$classMap; $loader->classMap = ComposerStaticInit1ae0d000312c743ada5d59e74eb795da::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }

View File

@@ -156,17 +156,17 @@
}, },
{ {
"name": "woocommerce/subscriptions-core", "name": "woocommerce/subscriptions-core",
"version": "5.8.0", "version": "6.0.0",
"version_normalized": "5.8.0.0", "version_normalized": "6.0.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Automattic/woocommerce-subscriptions-core.git", "url": "https://github.com/Automattic/woocommerce-subscriptions-core.git",
"reference": "24db3cf51eb191edb21e79421387072194b59046" "reference": "b48c46a6a08b73d8afc7a0e686173c5b5c55ecbb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/24db3cf51eb191edb21e79421387072194b59046", "url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/b48c46a6a08b73d8afc7a0e686173c5b5c55ecbb",
"reference": "24db3cf51eb191edb21e79421387072194b59046", "reference": "b48c46a6a08b73d8afc7a0e686173c5b5c55ecbb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -179,7 +179,7 @@
"woocommerce/woocommerce-sniffs": "0.1.0", "woocommerce/woocommerce-sniffs": "0.1.0",
"yoast/phpunit-polyfills": "1.0.3" "yoast/phpunit-polyfills": "1.0.3"
}, },
"time": "2023-07-05T04:17:20+00:00", "time": "2023-07-18T06:28:51+00:00",
"type": "wordpress-plugin", "type": "wordpress-plugin",
"extra": { "extra": {
"phpcodesniffer-search-depth": 2 "phpcodesniffer-search-depth": 2
@@ -209,7 +209,7 @@
"description": "Sell products and services with recurring payments in your WooCommerce Store.", "description": "Sell products and services with recurring payments in your WooCommerce Store.",
"homepage": "https://github.com/Automattic/woocommerce-subscriptions-core", "homepage": "https://github.com/Automattic/woocommerce-subscriptions-core",
"support": { "support": {
"source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/5.8.0", "source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/6.0.0",
"issues": "https://github.com/Automattic/woocommerce-subscriptions-core/issues" "issues": "https://github.com/Automattic/woocommerce-subscriptions-core/issues"
}, },
"install-path": "../woocommerce/subscriptions-core" "install-path": "../woocommerce/subscriptions-core"

View File

@@ -3,7 +3,7 @@
'name' => 'woocommerce/woocommerce-subscriptions', 'name' => 'woocommerce/woocommerce-subscriptions',
'pretty_version' => 'dev-trunk', 'pretty_version' => 'dev-trunk',
'version' => 'dev-trunk', 'version' => 'dev-trunk',
'reference' => '3654b75b4e4dc6fc0a87c6424910937660919214', 'reference' => '307075aa5a4fadd6012aa09c23368e4eb012ed8c',
'type' => 'wordpress-plugin', 'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@@ -32,9 +32,9 @@
), ),
), ),
'woocommerce/subscriptions-core' => array( 'woocommerce/subscriptions-core' => array(
'pretty_version' => '5.8.0', 'pretty_version' => '6.0.0',
'version' => '5.8.0.0', 'version' => '6.0.0.0',
'reference' => '24db3cf51eb191edb21e79421387072194b59046', 'reference' => 'b48c46a6a08b73d8afc7a0e686173c5b5c55ecbb',
'type' => 'wordpress-plugin', 'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../woocommerce/subscriptions-core', 'install_path' => __DIR__ . '/../woocommerce/subscriptions-core',
'aliases' => array(), 'aliases' => array(),
@@ -43,7 +43,7 @@
'woocommerce/woocommerce-subscriptions' => array( 'woocommerce/woocommerce-subscriptions' => array(
'pretty_version' => 'dev-trunk', 'pretty_version' => 'dev-trunk',
'version' => 'dev-trunk', 'version' => 'dev-trunk',
'reference' => '3654b75b4e4dc6fc0a87c6424910937660919214', 'reference' => '307075aa5a4fadd6012aa09c23368e4eb012ed8c',
'type' => 'wordpress-plugin', 'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),

View File

@@ -86,6 +86,26 @@ jQuery( function ( $ ) {
.addClass( 'form-row-last' ); .addClass( 'form-row-last' );
} }
}, },
enableSubscriptionProductFields: function () {
product_type = $( 'select#product-type' ).val();
enable_type = '';
// Variable subscriptions need to enable variable product fields and subscriptions products need to enable simple product fields.
if ( 'variable-subscription' === product_type ) {
enable_type = 'variable'
} else if ( 'subscription' === product_type ) {
enable_type = 'simple';
}
if ( enable_type ) {
$( `.enable_if_${ enable_type }` ).each( function () {
$( this ).removeClass( 'disabled' );
if ( $( this ).is( 'input' ) ) {
$( this ).prop( 'disabled', false );
}
} );
}
},
showOrHideStockFields: function () { showOrHideStockFields: function () {
if ( $( 'input#_manage_stock' ).is( ':checked' ) ) { if ( $( 'input#_manage_stock' ).is( ':checked' ) ) {
$( 'div.stock_fields' ).show(); $( 'div.stock_fields' ).show();
@@ -718,10 +738,35 @@ jQuery( function ( $ ) {
$( 'body' ).on( 'woocommerce-product-type-change', function () { $( 'body' ).on( 'woocommerce-product-type-change', function () {
$.showHideSubscriptionMeta(); $.showHideSubscriptionMeta();
$.showHideVariableSubscriptionMeta(); $.showHideVariableSubscriptionMeta();
$.enableSubscriptionProductFields();
$.showHideSyncOptions(); $.showHideSyncOptions();
$.showHideSubscriptionsPanels(); $.showHideSubscriptionsPanels();
} ); } );
// WC Core enable/disable product fields when saving attributes. We need to make sure we re-enable our fields.
$( document.body ).on( 'woocommerce_attributes_saved', function () {
$.enableSubscriptionProductFields();
} );
/**
* This function is called after WC Core fetches new attribute HTML and appends the elements asynchronously.
* It triggers relevant functions to hide/show and enable/disable fields.
*
* @see add_attribute_to_list() in assets/js/admin/meta-boxes-product.js
*
* Since there is no specific event to hook into when the async call is resolved, we rely on WC clicking
* the attribute metabox heading after fetching the HTML but before disabling the product fields.
* We take advantage of this by attaching a click event listener to the '.woocommerce_attribute.wc-metabox h3'
* element and waiting a short time before re-enabling the product fields.
*/
$( document ).on( 'click', '.woocommerce_attribute.wc-metabox h3', function() {
setTimeout( function() {
$.showHideSubscriptionMeta();
$.showHideVariableSubscriptionMeta();
$.enableSubscriptionProductFields();
}, 100 );
});
$( 'input#_downloadable, input#_virtual' ).on( 'change', function () { $( 'input#_downloadable, input#_virtual' ).on( 'change', function () {
$.showHideSubscriptionMeta(); $.showHideSubscriptionMeta();
$.showHideVariableSubscriptionMeta(); $.showHideVariableSubscriptionMeta();

View File

@@ -19,6 +19,31 @@ jQuery( function ( $ ) {
hide_non_applicable_coupons(); hide_non_applicable_coupons();
} ); } );
/**
* Update all subscriptions shipping methods which inherit the chosen method from the initial
* cart when the customer changes the shipping method.
*/
$( document ).on(
'change',
'select.shipping_method, :input[name^=shipping_method]',
function( event ) {
var shipping_method_option = $( event.target );
var shipping_method_id = shipping_method_option.val();
var package_index = shipping_method_option.data( 'index' );
// We're only interested in the initial cart shipping method options which have int package indexes.
if ( ! Number.isInteger( package_index ) ) {
return;
}
// Find all recurring cart info elements with the same package index as the changed shipping method.
$( '.recurring-cart-shipping-mapping-info[data-index=' + package_index + ']' ).each( function() {
// Update the corresponding subscription's hidden chosen shipping method.
$( 'input[name="shipping_method[' + $( this ).data( 'recurring_index' ) + ']"]' ).val( shipping_method_id );
} );
}
);
$( '.payment_methods [name="payment_method"]' ).on( 'click', function () { $( '.payment_methods [name="payment_method"]' ).on( 'click', function () {
if ( $( this ).hasClass( 'supports-payment-method-changes' ) ) { if ( $( this ).hasClass( 'supports-payment-method-changes' ) ) {
$( '.update-all-subscriptions-payment-method-wrap' ).show(); $( '.update-all-subscriptions-payment-method-wrap' ).show();

View File

@@ -1,5 +1,11 @@
*** WooCommerce Subscriptions Core Changelog *** *** WooCommerce Subscriptions Core Changelog ***
= 6.0.0 - 2023-07-18 =
* Fix - Resolve an issue that prevented the "Used for variations" checkbox from being enabled on the variable subscription product edit screen on WC version v7.9.0.
= 5.9.0 - 2023-07-14 =
* Fix - Ensure when a customer changes the shipping method on cart and checkout that the recurring totals correctly reflect the chosen method.
= 5.8.0 - 2023-07-05 = = 5.8.0 - 2023-07-05 =
* Fix - When HPOS is enabled, permanently deleting a subscription related order wasn't updating the related orders cache properly. * Fix - When HPOS is enabled, permanently deleting a subscription related order wasn't updating the related orders cache properly.
* Fix - Added logic to check if the recurring cart array is present before displaying the recurring totals section in the cart. * Fix - Added logic to check if the recurring cart array is present before displaying the recurring totals section in the cart.

View File

@@ -16,7 +16,7 @@ class WC_Subscriptions_Core_Plugin {
* The version of subscriptions-core library. * The version of subscriptions-core library.
* @var string * @var string
*/ */
protected $library_version = '5.8.0'; // WRCS: DEFINED_VERSION. protected $library_version = '6.0.0'; // WRCS: DEFINED_VERSION.
/** /**
* The subscription scheduler instance. * The subscription scheduler instance.

View File

@@ -64,6 +64,8 @@ class WC_Subscriptions_Order {
add_filter( 'woocommerce_payment_complete_order_status', __CLASS__ . '::maybe_autocomplete_order', 10, 3 ); add_filter( 'woocommerce_payment_complete_order_status', __CLASS__ . '::maybe_autocomplete_order', 10, 3 );
add_filter( 'woocommerce_order_data_store_cpt_get_orders_query', array( __CLASS__, 'add_subscription_order_query_args' ), 10, 2 ); add_filter( 'woocommerce_order_data_store_cpt_get_orders_query', array( __CLASS__, 'add_subscription_order_query_args' ), 10, 2 );
add_filter( 'woocommerce_order_query_args', array( __CLASS__, 'map_order_query_args_for_subscriptions' ) );
} }
/* /*
@@ -1218,6 +1220,58 @@ class WC_Subscriptions_Order {
return $query; return $query;
} }
/**
* Filter the query_vars of a wc_get_orders() query to map 'any' to be all valid subscription statuses instead of
* defaulting to only valid order statuses.
*
* @param $query_vars
*
* @return mixed
*/
public static function map_order_query_args_for_subscriptions( $query_vars ) {
if ( ! wcs_is_custom_order_tables_usage_enabled() ) {
return $query_vars;
}
/**
* Map the 'any' status to wcs_get_subscription_statuses() in HPOS environments.
*
* In HPOS environments, the 'any' status now maps to wc_get_order_statuses() statuses. Whereas, in
* WP Post architecture 'any' meant any status except for inherit, trash and auto-draft.
*
* If we're querying for subscriptions, we need to map 'any' to be all valid subscription statuses otherwise it would just search for order statuses.
*/
if ( isset( $query_vars['post_type'] ) && '' !== $query_vars['post_type'] ) {
// OrdersTableQuery::maybe_remap_args() will overwrite `type` with the `post_type` value.
if ( 'shop_subscription' !== $query_vars['post_type'] ) {
return $query_vars;
}
// Simplify the type logic.
$query_vars['type'] = 'shop_subscription';
unset( $query_vars['post_type'] );
}
if ( isset( $query_vars['type'] ) && 'shop_subscription' === $query_vars['type'] ) {
if ( isset( $query_vars['post_status'] ) && '' !== $query_vars['post_status'] ) {
// OrdersTableQuery::maybe_remap_args() will overwrite `status` with the `post_status` value.
if ( [ 'any' ] !== (array) $query_vars['post_status'] ) {
return $query_vars;
}
// Simplify the status logic.
$query_vars['status'] = 'any';
unset( $query_vars['post_status'] );
}
if ( [ 'any' ] === (array) $query_vars['status'] || [ '' ] === (array) $query_vars['status'] ) {
$query_vars['status'] = array_keys( wcs_get_subscription_statuses() );
}
}
return $query_vars;
}
/* Deprecated Functions */ /* Deprecated Functions */
/** /**

View File

@@ -85,9 +85,9 @@ function wcs_cart_totals_shipping_html() {
$shipping_selection_displayed = false; $shipping_selection_displayed = false;
$only_one_shipping_option = count( $package['rates'] ) === 1; $only_one_shipping_option = count( $package['rates'] ) === 1;
$recurring_rates_match_intial_rates = isset( $package['rates'][ $chosen_initial_method ] ) && isset( $initial_packages[ $package_index ] ) && $package['rates'] == $initial_packages[ $package_index ]['rates']; $recurring_rates_match_initial_rates = isset( $package['rates'][ $chosen_initial_method ] ) && isset( $initial_packages[ $package_index ] ) && $package['rates'] == $initial_packages[ $package_index ]['rates']; // phpcs:ignore WordPress.PHP.StrictComparisons
if ( $only_one_shipping_option || ( $recurring_rates_match_intial_rates && apply_filters( 'wcs_cart_totals_shipping_html_price_only', true, $package, $recurring_cart ) ) ) { if ( $only_one_shipping_option || ( $recurring_rates_match_initial_rates && apply_filters( 'wcs_cart_totals_shipping_html_price_only', true, $package, $recurring_cart ) ) ) {
$shipping_method = ( 1 === count( $package['rates'] ) ) ? current( $package['rates'] ) : $package['rates'][ $chosen_initial_method ]; $shipping_method = ( 1 === count( $package['rates'] ) ) ? current( $package['rates'] ) : $package['rates'][ $chosen_initial_method ];
// packages match, display shipping amounts only // packages match, display shipping amounts only
?> ?>
@@ -110,6 +110,9 @@ function wcs_cart_totals_shipping_html() {
<?php if ( ! empty( $show_package_details ) ) : ?> <?php if ( ! empty( $show_package_details ) ) : ?>
<?php echo '<p class="woocommerce-shipping-contents"><small>' . esc_html( $package_details ) . '</small></p>'; ?> <?php echo '<p class="woocommerce-shipping-contents"><small>' . esc_html( $package_details ) . '</small></p>'; ?>
<?php endif; ?> <?php endif; ?>
<?php if ( $recurring_rates_match_initial_rates ) : ?>
<?php wcs_cart_print_inherit_shipping_flag( $recurring_cart_package_key ); ?>
<?php endif; ?>
</td> </td>
</tr> </tr>
<?php <?php
@@ -183,6 +186,30 @@ function wcs_cart_print_shipping_input( $shipping_method_index, $shipping_method
); );
} }
/**
* Prints a hidden element which indicates that the shipping method for a given recurring cart is inherited from the initial cart.
*
* In frontend scripts, this hidden element's data properties are used to link initial cart shipping method changes to the
* corresponding hidden recurring cart shipping method input element.
*
* @param string $shipping_method_index The shipping method index for the recurring cart. eg 2023_08_11_monthly_0.
*/
function wcs_cart_print_inherit_shipping_flag( $shipping_method_index ) {
// Split the string using the underscore character
$parts = explode( '_', $shipping_method_index );
// Extract the recurring cart key and package index
$recurring_cart_key = implode( '_', array_slice( $parts, 0, -1 ) );
$package_index = end( $parts );
printf(
'<input type="hidden" data-recurring_index="%1$s" data-index="%2$s" data-recurring-cart-key="%3$s" data-recurring-cart-key="%2$s" value="true" class="recurring-cart-shipping-mapping-info"/>',
esc_attr( $shipping_method_index ),
esc_attr( $package_index ),
esc_attr( $recurring_cart_key )
);
}
/** /**
* Display a recurring shipping methods price & name as a label * Display a recurring shipping methods price & name as a label
* *

View File

@@ -406,22 +406,6 @@ function wcs_get_orders_with_meta_query( $args ) {
add_filter( 'woocommerce_order_data_store_cpt_get_orders_query', $handle_meta, 10, 2 ); add_filter( 'woocommerce_order_data_store_cpt_get_orders_query', $handle_meta, 10, 2 );
} }
/**
* Map the 'any' status to wcs_get_subscription_statuses() in HPOS environments.
*
* In HPOS environments, the 'any' status now maps to wc_get_order_statuses() statuses. Whereas, in
* WP Post architecture 'any' meant any status except for inherit, trash and auto-draft.
*
* If we're querying for subscriptions, we need to map 'any' to be all valid subscription statuses otherwise it would just search for order statuses.
*/
if ( isset( $args['status'], $args['type'] ) &&
[ 'any' ] === (array) $args['status'] &&
'shop_subscription' === $args['type'] &&
$is_hpos_in_use
) {
$args['status'] = array_keys( wcs_get_subscription_statuses() );
}
$results = wc_get_orders( $args ); $results = wc_get_orders( $args );
if ( ! $is_hpos_in_use ) { if ( ! $is_hpos_in_use ) {

View File

@@ -6,5 +6,5 @@
* Author: Automattic * Author: Automattic
* Author URI: https://woocommerce.com/ * Author URI: https://woocommerce.com/
* Requires WP: 5.6 * Requires WP: 5.6
* Version: 5.8.0 * Version: 6.0.0
*/ */

View File

@@ -5,10 +5,10 @@
* Description: Sell products and services with recurring payments in your WooCommerce Store. * Description: Sell products and services with recurring payments in your WooCommerce Store.
* Author: WooCommerce * Author: WooCommerce
* Author URI: https://woocommerce.com/ * Author URI: https://woocommerce.com/
* Version: 5.2.0 * Version: 5.3.0
* *
* WC requires at least: 6.5 * WC requires at least: 6.5
* WC tested up to: 7.8.0 * WC tested up to: 7.9.0
* Woo: 27147:6115e6d7e297b623a169fdcf5728b224 * Woo: 27147:6115e6d7e297b623a169fdcf5728b224
* *
* Copyright 2019 WooCommerce * Copyright 2019 WooCommerce
@@ -77,7 +77,7 @@ class WC_Subscriptions {
public static $plugin_file = __FILE__; public static $plugin_file = __FILE__;
/** @var string */ /** @var string */
public static $version = '5.2.0'; // WRCS: DEFINED_VERSION. public static $version = '5.3.0'; // WRCS: DEFINED_VERSION.
/** @var string */ /** @var string */
public static $wc_minimum_supported_version = '6.5'; public static $wc_minimum_supported_version = '6.5';