Changeset 2684108
- Timestamp:
- 02/24/2022 02:34:29 AM (2 years ago)
- Location:
- woocommerce-admin/trunk
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-admin/trunk/changelog.txt
r2683291 r2684108 1 2 3 4 1 5 == 3.2.0 02/22/2022 == 2 6 -
woocommerce-admin/trunk/dist/undefined/style-rtl.css
r2683291 r2684108 1 :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}.woocommerce-report-table__scroll-point{position:relative;top:-48px}@media(max-width:782px){.woocommerce-report-table__scroll-point{top:-62px}}.woocommerce-feature-enabled-activity-panels .woocommerce-report-table__scroll-point{top:-108px}@media(max-width:782px){.woocommerce-feature-enabled-activity-panels .woocommerce-report-table__scroll-point{top:-122px}}.woocommerce-report-table .woocommerce-search{flex-grow:1}.woocommerce-report-table .components-card__header{display:grid;grid-gap:12px;grid-template-columns:min-content 1fr min-content}.woocommerce-report-table .woocommerce-table__compare.components-button{padding:8px}.woocommerce-report-table .woocommerce-ellipsis-menu{justify-self:flex-end}button.woocommerce-table__download-button{padding:6px 12px;color:#000;text-decoration:none;align-items:center}button.woocommerce-table__download-button svg{margin-left:8px;height:24px;width:24px}@media(max-width:782px){button.woocommerce-table__download-button svg{margin-left:0}button.woocommerce-table__download-button .woocommerce-table__download-button__label{display:none}}1 } -
woocommerce-admin/trunk/languages/woocommerce-admin.pot
r2683291 r2684108 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WooCommerce Admin 3.2. 0\n"5 "Project-Id-Version: WooCommerce Admin 3.2.\n" 6 6 "Report-Msgid-Bugs-To: " 7 7 "https://wordpress.org/support/plugin/woocommerce-admin\n" 8 "POT-Creation-Date: 2022-02-2 2 17:51:18+00:00\n"8 "POT-Creation-Date: 2022-02-2+00:00\n" 9 9 "MIME-Version: 1.0\n" 10 10 "Content-Type: text/plain; charset=utf-8\n" … … 190 190 #: src/Features/Navigation/CoreMenu.php:95 src/ReportCSVEmail.php:36 191 191 #: client/analytics/report/revenue/table.js:65 192 #: client/analytics/report/coupons/table.js:38193 #: client/analytics/report/customers/table.js:60194 #: client/analytics/report/get-reports.js:78195 #: client/analytics/report/orders/config.js:26196 #: client/analytics/report/products/config.js:43197 192 #: client/analytics/report/taxes/config.js:47 198 193 #: client/analytics/report/taxes/table.js:58 -
woocommerce-admin/trunk/readme.txt
r2683291 r2684108 5 5 Tested up to: 5.9.0 6 6 Requires PHP: 7.0 7 Stable tag: 3.2. 07 Stable tag: 3.2. 8 8 License: GPLv3 9 9 License URI: https://github.com/woocommerce/woocommerce-admin/blob/main/license.txt -
woocommerce-admin/trunk/src/Composer/Package.php
r2683291 r2684108 27 27 * @var string 28 28 */ 29 const VERSION = '3.2. 0';29 const VERSION = '3.2.'; 30 30 31 31 /** -
woocommerce-admin/trunk/src/FeaturePlugin.php
r2683291 r2684108 147 147 // WARNING: Do not directly edit this version number constant. 148 148 // It is updated as part of the prebuild process from the package.json value. 149 $this->define( 'WC_ADMIN_VERSION_NUMBER', '3.2. 0' );149 $this->define( 'WC_ADMIN_VERSION_NUMBER', '3.2.' ); 150 150 } 151 151 -
woocommerce-admin/trunk/src/Overrides/Order.php
r2683291 r2684108 34 34 * @var int 35 35 */ 36 p rotected$customer_id = null;36 p $customer_id = null; 37 37 38 38 /** -
woocommerce-admin/trunk/src/Overrides/OrderRefund.php
r2683291 r2684108 26 26 * @var int 27 27 */ 28 p rotected$customer_id = null;28 p $customer_id = null; 29 29 30 30 /** -
woocommerce-admin/trunk/vendor/autoload.php
r2683291 r2684108 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit b9d4dc43417ed5e4334742391b886954::getLoader();7 return ComposerAutoloaderInit::getLoader(); -
woocommerce-admin/trunk/vendor/autoload_packages.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/composer/ClassLoader.php
r2683291 r2684108 43 43 class ClassLoader 44 44 { 45 /** @var ?string */46 45 private $vendorDir; 47 46 48 47 // PSR-4 49 /**50 * @var array[]51 * @psalm-var array<string, array<string, int>>52 */53 48 private $prefixLengthsPsr4 = array(); 54 /**55 * @var array[]56 * @psalm-var array<string, array<int, string>>57 */58 49 private $prefixDirsPsr4 = array(); 59 /**60 * @var array[]61 * @psalm-var array<string, string>62 */63 50 private $fallbackDirsPsr4 = array(); 64 51 65 52 // PSR-0 66 /**67 * @var array[]68 * @psalm-var array<string, array<string, string[]>>69 */70 53 private $prefixesPsr0 = array(); 71 /**72 * @var array[]73 * @psalm-var array<string, string>74 */75 54 private $fallbackDirsPsr0 = array(); 76 55 77 /** @var bool */78 56 private $useIncludePath = false; 79 80 /**81 * @var string[]82 * @psalm-var array<string, string>83 */84 57 private $classMap = array(); 85 86 /** @var bool */87 58 private $classMapAuthoritative = false; 88 89 /**90 * @var bool[]91 * @psalm-var array<string, bool>92 */93 59 private $missingClasses = array(); 94 95 /** @var ?string */96 60 private $apcuPrefix; 97 61 98 /**99 * @var self[]100 */101 62 private static $registeredLoaders = array(); 102 63 103 /**104 * @param ?string $vendorDir105 */106 64 public function __construct($vendorDir = null) 107 65 { … … 109 67 } 110 68 111 /**112 * @return string[]113 */114 69 public function getPrefixes() 115 70 { … … 121 76 } 122 77 123 /**124 * @return array[]125 * @psalm-return array<string, array<int, string>>126 */127 78 public function getPrefixesPsr4() 128 79 { … … 130 81 } 131 82 132 /**133 * @return array[]134 * @psalm-return array<string, string>135 */136 83 public function getFallbackDirs() 137 84 { … … 139 86 } 140 87 141 /**142 * @return array[]143 * @psalm-return array<string, string>144 */145 88 public function getFallbackDirsPsr4() 146 89 { … … 148 91 } 149 92 150 /**151 * @return string[] Array of classname => path152 * @psalm-return array<string, string>153 */154 93 public function getClassMap() 155 94 { … … 158 97 159 98 /** 160 * @param string[] $classMap Class to filename map 161 * @psalm-param array<string, string> $classMap 162 * 163 * @return void 99 * @param array $classMap Class to filename map 164 100 */ 165 101 public function addClassMap(array $classMap) … … 176 112 * appending or prepending to the ones previously set for this prefix. 177 113 * 178 * @param string $prefix The prefix 179 * @param string[]|string $paths The PSR-0 root directories 180 * @param bool $prepend Whether to prepend the directories 181 * 182 * @return void 114 * @param string $prefix The prefix 115 * @param array|string $paths The PSR-0 root directories 116 * @param bool $prepend Whether to prepend the directories 183 117 */ 184 118 public function add($prefix, $paths, $prepend = false) … … 223 157 * appending or prepending to the ones previously set for this namespace. 224 158 * 225 * @param string 226 * @param string[]|string $paths The PSR-4 base directories227 * @param bool 159 * @param string $prefix The prefix/namespace, with trailing '\\' 160 * @param |string $paths The PSR-4 base directories 161 * @param bool $prepend Whether to prepend the directories 228 162 * 229 163 * @throws \InvalidArgumentException 230 *231 * @return void232 164 */ 233 165 public function addPsr4($prefix, $paths, $prepend = false) … … 273 205 * replacing any others previously set for this prefix. 274 206 * 275 * @param string $prefix The prefix 276 * @param string[]|string $paths The PSR-0 base directories 277 * 278 * @return void 207 * @param string $prefix The prefix 208 * @param array|string $paths The PSR-0 base directories 279 209 */ 280 210 public function set($prefix, $paths) … … 291 221 * replacing any others previously set for this namespace. 292 222 * 293 * @param string 294 * @param string[]|string $paths The PSR-4 base directories223 * @param string $prefix The prefix/namespace, with trailing '\\' 224 * @param |string $paths The PSR-4 base directories 295 225 * 296 226 * @throws \InvalidArgumentException 297 *298 * @return void299 227 */ 300 228 public function setPsr4($prefix, $paths) … … 316 244 * 317 245 * @param bool $useIncludePath 318 *319 * @return void320 246 */ 321 247 public function setUseIncludePath($useIncludePath) … … 340 266 * 341 267 * @param bool $classMapAuthoritative 342 *343 * @return void344 268 */ 345 269 public function setClassMapAuthoritative($classMapAuthoritative) … … 362 286 * 363 287 * @param string|null $apcuPrefix 364 *365 * @return void366 288 */ 367 289 public function setApcuPrefix($apcuPrefix) … … 384 306 * 385 307 * @param bool $prepend Whether to prepend the autoloader or not 386 *387 * @return void388 308 */ 389 309 public function register($prepend = false) … … 405 325 /** 406 326 * Unregisters this instance as an autoloader. 407 *408 * @return void409 327 */ 410 328 public function unregister() … … 421 339 * 422 340 * @param string $class The name of the class 423 * @return true|null True if loaded, null otherwise341 * @return |null True if loaded, null otherwise 424 342 */ 425 343 public function loadClass($class) … … 430 348 return true; 431 349 } 432 433 return null;434 350 } 435 351 … … 486 402 } 487 403 488 /**489 * @param string $class490 * @param string $ext491 * @return string|false492 */493 404 private function findFileWithExtension($class, $ext) 494 405 { … … 562 473 * 563 474 * Prevents access to $this/self from included files. 564 *565 * @param string $file566 * @return void567 * @private568 475 */ 569 476 function includeFile($file) -
woocommerce-admin/trunk/vendor/composer/InstalledVersions.php
r2683291 r2684108 1 1 <?php 2 2 3 /* 4 * This file is part of Composer. 5 * 6 * (c) Nils Adermann <naderman@naderman.de> 7 * Jordi Boggiano <j.boggiano@seld.be> 8 * 9 * For the full copyright and license information, please view the LICENSE 10 * file that was distributed with this source code. 11 */ 3 4 5 6 7 8 9 10 11 12 12 13 13 namespace Composer; … … 16 16 use Composer\Semver\VersionParser; 17 17 18 /** 19 * This class is copied in every Composer installed project and available to all 20 * 21 * See also https://getcomposer.org/doc/07-runtime.md#installed-versions 22 * 23 * To require its presence, you can require `composer-runtime-api ^2.0` 24 */ 18 19 20 21 22 23 24 25 25 class InstalledVersions 26 26 { 27 /** 28 * @var mixed[]|null 29 * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null 30 */ 31 private static $installed; 32 33 /** 34 * @var bool|null 35 */ 36 private static $canGetVendors; 37 38 /** 39 * @var array[] 40 * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}> 41 */ 42 private static $installedByVendor = array(); 43 44 /** 45 * Returns a list of all package names which are present, either by being installed, replaced or provided 46 * 47 * @return string[] 48 * @psalm-return list<string> 49 */ 50 public static function getInstalledPackages() 51 { 52 $packages = array(); 53 foreach (self::getInstalled() as $installed) { 54 $packages[] = array_keys($installed['versions']); 55 } 56 57 if (1 === \count($packages)) { 58 return $packages[0]; 59 } 60 61 return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); 62 } 63 64 /** 65 * Returns a list of all package names with a specific type e.g. 'library' 66 * 67 * @param string $type 68 * @return string[] 69 * @psalm-return list<string> 70 */ 71 public static function getInstalledPackagesByType($type) 72 { 73 $packagesByType = array(); 74 75 foreach (self::getInstalled() as $installed) { 76 foreach ($installed['versions'] as $name => $package) { 77 if (isset($package['type']) && $package['type'] === $type) { 78 $packagesByType[] = $name; 79 } 80 } 81 } 82 83 return $packagesByType; 84 } 85 86 /** 87 * Checks whether the given package is installed 88 * 89 * This also returns true if the package name is provided or replaced by another package 90 * 91 * @param string $packageName 92 * @param bool $includeDevRequirements 93 * @return bool 94 */ 95 public static function isInstalled($packageName, $includeDevRequirements = true) 96 { 97 foreach (self::getInstalled() as $installed) { 98 if (isset($installed['versions'][$packageName])) { 99 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); 100 } 101 } 102 103 return false; 104 } 105 106 /** 107 * Checks whether the given package satisfies a version constraint 108 * 109 * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: 110 * 111 * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') 112 * 113 * @param VersionParser $parser Install composer/semver to have access to this class and functionality 114 * @param string $packageName 115 * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package 116 * @return bool 117 */ 118 public static function satisfies(VersionParser $parser, $packageName, $constraint) 119 { 120 $constraint = $parser->parseConstraints($constraint); 121 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 122 123 return $provided->matches($constraint); 124 } 125 126 /** 127 * Returns a version constraint representing all the range(s) which are installed for a given package 128 * 129 * It is easier to use this via isInstalled() with the $constraint argument if you need to check 130 * whether a given version of a package is installed, and not just whether it exists 131 * 132 * @param string $packageName 133 * @return string Version constraint usable with composer/semver 134 */ 135 public static function getVersionRanges($packageName) 136 { 137 foreach (self::getInstalled() as $installed) { 138 if (!isset($installed['versions'][$packageName])) { 139 continue; 140 } 141 142 $ranges = array(); 143 if (isset($installed['versions'][$packageName]['pretty_version'])) { 144 $ranges[] = $installed['versions'][$packageName]['pretty_version']; 145 } 146 if (array_key_exists('aliases', $installed['versions'][$packageName])) { 147 $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); 148 } 149 if (array_key_exists('replaced', $installed['versions'][$packageName])) { 150 $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); 151 } 152 if (array_key_exists('provided', $installed['versions'][$packageName])) { 153 $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); 154 } 155 156 return implode(' || ', $ranges); 157 } 158 159 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); 160 } 161 162 /** 163 * @param string $packageName 164 * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present 165 */ 166 public static function getVersion($packageName) 167 { 168 foreach (self::getInstalled() as $installed) { 169 if (!isset($installed['versions'][$packageName])) { 170 continue; 171 } 172 173 if (!isset($installed['versions'][$packageName]['version'])) { 174 return null; 175 } 176 177 return $installed['versions'][$packageName]['version']; 178 } 179 180 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); 181 } 182 183 /** 184 * @param string $packageName 185 * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present 186 */ 187 public static function getPrettyVersion($packageName) 188 { 189 foreach (self::getInstalled() as $installed) { 190 if (!isset($installed['versions'][$packageName])) { 191 continue; 192 } 193 194 if (!isset($installed['versions'][$packageName]['pretty_version'])) { 195 return null; 196 } 197 198 return $installed['versions'][$packageName]['pretty_version']; 199 } 200 201 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); 202 } 203 204 /** 205 * @param string $packageName 206 * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference 207 */ 208 public static function getReference($packageName) 209 { 210 foreach (self::getInstalled() as $installed) { 211 if (!isset($installed['versions'][$packageName])) { 212 continue; 213 } 214 215 if (!isset($installed['versions'][$packageName]['reference'])) { 216 return null; 217 } 218 219 return $installed['versions'][$packageName]['reference']; 220 } 221 222 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); 223 } 224 225 /** 226 * @param string $packageName 227 * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. 228 */ 229 public static function getInstallPath($packageName) 230 { 231 foreach (self::getInstalled() as $installed) { 232 if (!isset($installed['versions'][$packageName])) { 233 continue; 234 } 235 236 return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; 237 } 238 239 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); 240 } 241 242 /** 243 * @return array 244 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} 245 */ 246 public static function getRootPackage() 247 { 248 $installed = self::getInstalled(); 249 250 return $installed[0]['root']; 251 } 252 253 /** 254 * Returns the raw installed.php data for custom implementations 255 * 256 * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 257 * @return array[] 258 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} 259 */ 260 public static function getRawData() 261 { 262 @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); 263 264 if (null === self::$installed) { 265 // only require the installed.php file if this file is loaded from its dumped location, 266 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 267 if (substr(__DIR__, -8, 1) !== 'C') { 268 self::$installed = include __DIR__ . '/installed.php'; 269 } else { 270 self::$installed = array(); 271 } 272 } 273 274 return self::$installed; 275 } 276 277 /** 278 * Returns the raw data of all installed.php which are currently loaded for custom implementations 279 * 280 * @return array[] 281 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}> 282 */ 283 public static function getAllRawData() 284 { 285 return self::getInstalled(); 286 } 287 288 /** 289 * Lets you reload the static array from another file 290 * 291 * This is only useful for complex integrations in which a project needs to use 292 * this class but then also needs to execute another project's autoloader in process, 293 * and wants to ensure both projects have access to their version of installed.php. 294 * 295 * A typical case would be PHPUnit, where it would need to make sure it reads all 296 * the data it needs from this class, then call reload() with 297 * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure 298 * the project in which it runs can then also use this class safely, without 299 * interference between PHPUnit's dependencies and the project's dependencies. 300 * 301 * @param array[] $data A vendor/composer/installed.php data set 302 * @return void 303 * 304 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data 305 */ 306 public static function reload($data) 307 { 308 self::$installed = $data; 309 self::$installedByVendor = array(); 310 } 311 312 /** 313 * @return array[] 314 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}> 315 */ 316 private static function getInstalled() 317 { 318 if (null === self::$canGetVendors) { 319 self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); 320 } 321 322 $installed = array(); 323 324 if (self::$canGetVendors) { 325 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 326 if (isset(self::$installedByVendor[$vendorDir])) { 327 $installed[] = self::$installedByVendor[$vendorDir]; 328 } elseif (is_file($vendorDir.'/composer/installed.php')) { 329 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; 330 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 331 self::$installed = $installed[count($installed) - 1]; 332 } 333 } 334 } 335 } 336 337 if (null === self::$installed) { 338 // only require the installed.php file if this file is loaded from its dumped location, 339 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 340 if (substr(__DIR__, -8, 1) !== 'C') { 341 self::$installed = require __DIR__ . '/installed.php'; 342 } else { 343 self::$installed = array(); 344 } 345 } 346 $installed[] = self::$installed; 347 348 return $installed; 349 } 350 } 27 private static $installed = array ( 28 'root' => 29 array ( 30 'pretty_version' => '3.2.1', 31 'version' => '3.2.1.0', 32 'aliases' => 33 array ( 34 ), 35 'reference' => NULL, 36 'name' => 'woocommerce/woocommerce-admin', 37 ), 38 'versions' => 39 array ( 40 'automattic/jetpack-autoloader' => 41 array ( 42 'pretty_version' => 'v2.10.5', 43 'version' => '2.10.5.0', 44 'aliases' => 45 array ( 46 ), 47 'reference' => 'ec66177eefa1126d5319f3135ff3a7185e21a0ba', 48 ), 49 'composer/installers' => 50 array ( 51 'pretty_version' => 'v1.12.0', 52 'version' => '1.12.0.0', 53 'aliases' => 54 array ( 55 ), 56 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', 57 ), 58 'roundcube/plugin-installer' => 59 array ( 60 'replaced' => 61 array ( 62 0 => '*', 63 ), 64 ), 65 'shama/baton' => 66 array ( 67 'replaced' => 68 array ( 69 0 => '*', 70 ), 71 ), 72 'woocommerce/woocommerce-admin' => 73 array ( 74 'pretty_version' => '3.2.1', 75 'version' => '3.2.1.0', 76 'aliases' => 77 array ( 78 ), 79 'reference' => NULL, 80 ), 81 ), 82 ); 83 private static $canGetVendors; 84 private static $installedByVendor = array(); 85 86 87 88 89 90 91 92 public static function getInstalledPackages() 93 { 94 $packages = array(); 95 foreach (self::getInstalled() as $installed) { 96 $packages[] = array_keys($installed['versions']); 97 } 98 99 if (1 === \count($packages)) { 100 return $packages[0]; 101 } 102 103 return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); 104 } 105 106 107 108 109 110 111 112 113 114 public static function isInstalled($packageName) 115 { 116 foreach (self::getInstalled() as $installed) { 117 if (isset($installed['versions'][$packageName])) { 118 return true; 119 } 120 } 121 122 return false; 123 } 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 public static function satisfies(VersionParser $parser, $packageName, $constraint) 139 { 140 $constraint = $parser->parseConstraints($constraint); 141 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 142 143 return $provided->matches($constraint); 144 } 145 146 147 148 149 150 151 152 153 154 155 public static function getVersionRanges($packageName) 156 { 157 foreach (self::getInstalled() as $installed) { 158 if (!isset($installed['versions'][$packageName])) { 159 continue; 160 } 161 162 $ranges = array(); 163 if (isset($installed['versions'][$packageName]['pretty_version'])) { 164 $ranges[] = $installed['versions'][$packageName]['pretty_version']; 165 } 166 if (array_key_exists('aliases', $installed['versions'][$packageName])) { 167 $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); 168 } 169 if (array_key_exists('replaced', $installed['versions'][$packageName])) { 170 $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); 171 } 172 if (array_key_exists('provided', $installed['versions'][$packageName])) { 173 $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); 174 } 175 176 return implode(' || ', $ranges); 177 } 178 179 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); 180 } 181 182 183 184 185 186 public static function getVersion($packageName) 187 { 188 foreach (self::getInstalled() as $installed) { 189 if (!isset($installed['versions'][$packageName])) { 190 continue; 191 } 192 193 if (!isset($installed['versions'][$packageName]['version'])) { 194 return null; 195 } 196 197 return $installed['versions'][$packageName]['version']; 198 } 199 200 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); 201 } 202 203 204 205 206 207 public static function getPrettyVersion($packageName) 208 { 209 foreach (self::getInstalled() as $installed) { 210 if (!isset($installed['versions'][$packageName])) { 211 continue; 212 } 213 214 if (!isset($installed['versions'][$packageName]['pretty_version'])) { 215 return null; 216 } 217 218 return $installed['versions'][$packageName]['pretty_version']; 219 } 220 221 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); 222 } 223 224 225 226 227 228 public static function getReference($packageName) 229 { 230 foreach (self::getInstalled() as $installed) { 231 if (!isset($installed['versions'][$packageName])) { 232 continue; 233 } 234 235 if (!isset($installed['versions'][$packageName]['reference'])) { 236 return null; 237 } 238 239 return $installed['versions'][$packageName]['reference']; 240 } 241 242 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); 243 } 244 245 246 247 248 249 public static function getRootPackage() 250 { 251 $installed = self::getInstalled(); 252 253 return $installed[0]['root']; 254 } 255 256 257 258 259 260 261 262 public static function getRawData() 263 { 264 return self::$installed; 265 } 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 public static function reload($data) 286 { 287 self::$installed = $data; 288 self::$installedByVendor = array(); 289 } 290 291 292 293 294 295 private static function getInstalled() 296 { 297 if (null === self::$canGetVendors) { 298 self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); 299 } 300 301 $installed = array(); 302 303 if (self::$canGetVendors) { 304 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 305 if (isset(self::$installedByVendor[$vendorDir])) { 306 $installed[] = self::$installedByVendor[$vendorDir]; 307 } elseif (is_file($vendorDir.'/composer/installed.php')) { 308 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; 309 } 310 } 311 } 312 313 $installed[] = self::$installed; 314 315 return $installed; 316 } 317 } -
woocommerce-admin/trunk/vendor/composer/autoload_real.php
r2683291 r2684108 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit b9d4dc43417ed5e4334742391b8869545 class ComposerAutoloaderInit 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit b9d4dc43417ed5e4334742391b886954', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit b9d4dc43417ed5e4334742391b886954', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit b9d4dc43417ed5e4334742391b886954::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInit::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; -
woocommerce-admin/trunk/vendor/composer/autoload_static.php
r2683291 r2684108 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit b9d4dc43417ed5e4334742391b8869547 class ComposerStaticInit 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 42 42 { 43 43 return \Closure::bind(function () use ($loader) { 44 $loader->prefixLengthsPsr4 = ComposerStaticInit b9d4dc43417ed5e4334742391b886954::$prefixLengthsPsr4;45 $loader->prefixDirsPsr4 = ComposerStaticInit b9d4dc43417ed5e4334742391b886954::$prefixDirsPsr4;46 $loader->classMap = ComposerStaticInit b9d4dc43417ed5e4334742391b886954::$classMap;44 $loader->prefixLengthsPsr4 = ComposerStaticInit::$prefixLengthsPsr4; 45 $loader->prefixDirsPsr4 = ComposerStaticInit::$prefixDirsPsr4; 46 $loader->classMap = ComposerStaticInit::$classMap; 47 47 48 48 }, null, ClassLoader::class); -
woocommerce-admin/trunk/vendor/composer/installed.php
r2683291 r2684108 1 <?php return array( 2 'root' => array( 3 'pretty_version' => '3.2.0', 4 'version' => '3.2.0.0', 5 'type' => 'wordpress-plugin', 6 'install_path' => __DIR__ . '/../../', 7 'aliases' => array(), 8 'reference' => NULL, 9 'name' => 'woocommerce/woocommerce-admin', 10 'dev' => false, 1 <?php return array ( 2 'root' => 3 array ( 4 'pretty_version' => '3.2.1', 5 'version' => '3.2.1.0', 6 'aliases' => 7 array ( 11 8 ), 12 'versions' => array( 13 'automattic/jetpack-autoloader' => array( 14 'pretty_version' => 'v2.10.5', 15 'version' => '2.10.5.0', 16 'type' => 'composer-plugin', 17 'install_path' => __DIR__ . '/../automattic/jetpack-autoloader', 18 'aliases' => array(), 19 'reference' => 'ec66177eefa1126d5319f3135ff3a7185e21a0ba', 20 'dev_requirement' => false, 21 ), 22 'composer/installers' => array( 23 'pretty_version' => 'v1.12.0', 24 'version' => '1.12.0.0', 25 'type' => 'composer-plugin', 26 'install_path' => __DIR__ . '/./installers', 27 'aliases' => array(), 28 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', 29 'dev_requirement' => false, 30 ), 31 'roundcube/plugin-installer' => array( 32 'dev_requirement' => false, 33 'replaced' => array( 34 0 => '*', 35 ), 36 ), 37 'shama/baton' => array( 38 'dev_requirement' => false, 39 'replaced' => array( 40 0 => '*', 41 ), 42 ), 43 'woocommerce/woocommerce-admin' => array( 44 'pretty_version' => '3.2.0', 45 'version' => '3.2.0.0', 46 'type' => 'wordpress-plugin', 47 'install_path' => __DIR__ . '/../../', 48 'aliases' => array(), 49 'reference' => NULL, 50 'dev_requirement' => false, 51 ), 9 'reference' => NULL, 10 'name' => 'woocommerce/woocommerce-admin', 11 ), 12 'versions' => 13 array ( 14 'automattic/jetpack-autoloader' => 15 array ( 16 'pretty_version' => 'v2.10.5', 17 'version' => '2.10.5.0', 18 'aliases' => 19 array ( 20 ), 21 'reference' => 'ec66177eefa1126d5319f3135ff3a7185e21a0ba', 52 22 ), 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 53 56 ); -
woocommerce-admin/trunk/vendor/composer/jetpack_autoload_psr4.php
r2683291 r2684108 12 12 ), 13 13 'Automattic\\WooCommerce\\Admin\\' => array( 14 'version' => '3.2. 0.0',14 'version' => '3.2..0', 15 15 'path' => array( $baseDir . '/src' ) 16 16 ), -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-autoloader-handler.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-autoloader-locator.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-autoloader.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-container.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-hook-manager.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-latest-autoloader-guard.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-manifest-reader.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-path-processor.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-php-autoloader.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-plugin-locator.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-plugins-handler.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-shutdown-handler.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-version-loader.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/vendor/jetpack-autoloader/class-version-selector.php
r2683291 r2684108 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp b9d4dc43417ed5e4334742391b886954;8 namespace Automattic\Jetpack\Autoloader\jp; 9 9 10 10 // phpcs:ignore -
woocommerce-admin/trunk/woocommerce-admin.php
r2683291 r2684108 8 8 * Text Domain: woocommerce-admin 9 9 * Domain Path: /languages 10 * Version: 3.2. 010 * Version: 3.2. 11 11 * Requires at least: 5.6 12 12 * Requires PHP: 7.0
Note: See TracChangeset
for help on using the changeset viewer.