Skip to content

Commit

Permalink
Updates to 5.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
WooCommerce committed Aug 11, 2023
1 parent cda4fb2 commit e36f44e
Show file tree
Hide file tree
Showing 21 changed files with 395 additions and 237 deletions.
8 changes: 8 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
*** WooCommerce Subscriptions Changelog ***

2023-08-11 - version 5.4.0
* Add: Introduce an updated empty state screen for the WooCommerce > Subscriptions list table.
* Fix: Ensure subscription checkout and cart block integrations are loaded on store environments where WooPayments is not enabled.
* Fix: Ensure the shipping phone number field is copied to subscriptions and their orders when copying address meta.
* Update: When HPOS is disabled, fetch subscriptions by customer_id using the user's subscription cache to improve performance.
* Dev: Deprecated the 'woocommerce_subscriptions_not_found_label' filter.
* Dev: Updated subscriptions-core to 6.2.0

2023-07-26 - version 5.3.1
* Fix: Resolved an issue that prevented the "Used for variations" checkbox to not be enabled on the edit product page load causing variations to be deleted erroneously.
* Dev: Fixed wcs_get_subscription_orders() returning an empty list when querying parent orders when HPOS is enabled with data syncing off.
Expand Down
268 changes: 128 additions & 140 deletions languages/woocommerce-subscriptions.pot

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit8568f0690e3926c86f2dbdbb3a1ffeaa::getLoader();
return ComposerAutoloaderInit1343a378b98b98b93d2e309b8e304370::getLoader();
96 changes: 51 additions & 45 deletions vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,63 +45,66 @@ class ClassLoader
/** @var \Closure(string):void */
private static $includeFile;

/** @var string|null */
/** @var ?string */
private $vendorDir;

// PSR-4
/**
* @var array<string, array<string, int>>
* @var array[]
* @psalm-var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array<string, list<string>>
* @var array[]
* @psalm-var array<string, array<int, string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var list<string>
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr4 = array();

// PSR-0
/**
* List of PSR-0 prefixes
*
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
* @var array[]
* @psalm-var array<string, array<string, string[]>>
*/
private $prefixesPsr0 = array();
/**
* @var list<string>
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr0 = array();

/** @var bool */
private $useIncludePath = false;

/**
* @var array<string, string>
* @var string[]
* @psalm-var array<string, string>
*/
private $classMap = array();

/** @var bool */
private $classMapAuthoritative = false;

/**
* @var array<string, bool>
* @var bool[]
* @psalm-var array<string, bool>
*/
private $missingClasses = array();

/** @var string|null */
/** @var ?string */
private $apcuPrefix;

/**
* @var array<string, self>
* @var self[]
*/
private static $registeredLoaders = array();

/**
* @param string|null $vendorDir
* @param ?string $vendorDir
*/
public function __construct($vendorDir = null)
{
Expand All @@ -110,7 +113,7 @@ public function __construct($vendorDir = null)
}

/**
* @return array<string, list<string>>
* @return string[]
*/
public function getPrefixes()
{
Expand All @@ -122,39 +125,44 @@ public function getPrefixes()
}

/**
* @return array<string, list<string>>
* @return array[]
* @psalm-return array<string, array<int, string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}

/**
* @return list<string>
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}

/**
* @return list<string>
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}

/**
* @return array<string, string> Array of classname => path
* @return string[] Array of classname => path
* @psalm-return array<string, string>
*/
public function getClassMap()
{
return $this->classMap;
}

/**
* @param array<string, string> $classMap Class to filename map
* @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
*
* @return void
*/
Expand All @@ -171,25 +179,24 @@ public function addClassMap(array $classMap)
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
$paths,
(array) $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
$paths
(array) $paths
);
}

Expand All @@ -198,19 +205,19 @@ public function add($prefix, $paths, $prepend = false)

$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = $paths;
$this->prefixesPsr0[$first][$prefix] = (array) $paths;

return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$paths,
(array) $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
$paths
(array) $paths
);
}
}
Expand All @@ -219,28 +226,27 @@ public function add($prefix, $paths, $prepend = false)
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
$paths,
(array) $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
$paths
(array) $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
Expand All @@ -250,18 +256,18 @@ public function addPsr4($prefix, $paths, $prepend = false)
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = $paths;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$paths,
(array) $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
$paths
(array) $paths
);
}
}
Expand All @@ -270,8 +276,8 @@ public function addPsr4($prefix, $paths, $prepend = false)
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 base directories
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories
*
* @return void
*/
Expand All @@ -288,8 +294,8 @@ public function set($prefix, $paths)
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
Expand Down Expand Up @@ -475,9 +481,9 @@ public function findFile($class)
}

/**
* Returns the currently registered loaders keyed by their corresponding vendor directories.
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return array<string, self>
* @return self[]
*/
public static function getRegisteredLoaders()
{
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit8568f0690e3926c86f2dbdbb3a1ffeaa
class ComposerAutoloaderInit1343a378b98b98b93d2e309b8e304370
{
private static $loader;

Expand All @@ -24,12 +24,12 @@ public static function getLoader()

require __DIR__ . '/platform_check.php';

spl_autoload_register(array('ComposerAutoloaderInit8568f0690e3926c86f2dbdbb3a1ffeaa', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit1343a378b98b98b93d2e309b8e304370', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit8568f0690e3926c86f2dbdbb3a1ffeaa', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit1343a378b98b98b93d2e309b8e304370', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit8568f0690e3926c86f2dbdbb3a1ffeaa::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit1343a378b98b98b93d2e309b8e304370::getInitializer($loader));

$loader->register(true);

Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit8568f0690e3926c86f2dbdbb3a1ffeaa
class ComposerStaticInit1343a378b98b98b93d2e309b8e304370
{
public static $prefixLengthsPsr4 = array (
'C' =>
Expand Down Expand Up @@ -129,9 +129,9 @@ class ComposerStaticInit8568f0690e3926c86f2dbdbb3a1ffeaa
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit8568f0690e3926c86f2dbdbb3a1ffeaa::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit8568f0690e3926c86f2dbdbb3a1ffeaa::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit8568f0690e3926c86f2dbdbb3a1ffeaa::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit1343a378b98b98b93d2e309b8e304370::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit1343a378b98b98b93d2e309b8e304370::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit1343a378b98b98b93d2e309b8e304370::$classMap;

}, null, ClassLoader::class);
}
Expand Down
14 changes: 7 additions & 7 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,17 @@
},
{
"name": "woocommerce/subscriptions-core",
"version": "6.1.0",
"version_normalized": "6.1.0.0",
"version": "6.2.0",
"version_normalized": "6.2.0.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/woocommerce-subscriptions-core.git",
"reference": "507720f600363a6c1e7da1b4b82660c7ab6a0c0e"
"reference": "47cfe92d60239d1b8b12a5f640a3772b0e4e1272"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/507720f600363a6c1e7da1b4b82660c7ab6a0c0e",
"reference": "507720f600363a6c1e7da1b4b82660c7ab6a0c0e",
"url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/47cfe92d60239d1b8b12a5f640a3772b0e4e1272",
"reference": "47cfe92d60239d1b8b12a5f640a3772b0e4e1272",
"shasum": ""
},
"require": {
Expand All @@ -179,7 +179,7 @@
"woocommerce/woocommerce-sniffs": "0.1.0",
"yoast/phpunit-polyfills": "1.0.3"
},
"time": "2023-07-26T03:44:54+00:00",
"time": "2023-08-10T23:43:48+00:00",
"type": "wordpress-plugin",
"extra": {
"phpcodesniffer-search-depth": 2
Expand Down Expand Up @@ -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.1.0",
"source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/6.2.0",
"issues": "https://github.com/Automattic/woocommerce-subscriptions-core/issues"
},
"install-path": "../woocommerce/subscriptions-core"
Expand Down
Loading

0 comments on commit e36f44e

Please sign in to comment.