Plugin Directory

Changeset 2684108

Timestamp:
02/24/2022 02:34:29 AM (2 years ago)
Author:
adrianduffell
Message:

Release v3.2.1

Location:
woocommerce-admin/trunk
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-admin/trunk/changelog.txt

    r2683291 r2684108  
     1
     2
     3
     4
    15== 3.2.0 02/22/2022 ==
    26
  • 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  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WooCommerce Admin 3.2.0\n"
     5"Project-Id-Version: WooCommerce Admin 3.2.\n"
    66"Report-Msgid-Bugs-To: "
    77"https://wordpress.org/support/plugin/woocommerce-admin\n"
    8 "POT-Creation-Date: 2022-02-22 17:51:18+00:00\n"
     8"POT-Creation-Date: 2022-02-2+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
     
    190190#: src/Features/Navigation/CoreMenu.php:95 src/ReportCSVEmail.php:36
    191191#: client/analytics/report/revenue/table.js:65
    192 #: client/analytics/report/coupons/table.js:38
    193 #: client/analytics/report/customers/table.js:60
    194 #: client/analytics/report/get-reports.js:78
    195 #: client/analytics/report/orders/config.js:26
    196 #: client/analytics/report/products/config.js:43
    197192#: client/analytics/report/taxes/config.js:47
    198193#: client/analytics/report/taxes/table.js:58
  • woocommerce-admin/trunk/readme.txt

    r2683291 r2684108  
    55Tested up to: 5.9.0
    66Requires PHP: 7.0
    7 Stable tag: 3.2.0
     7Stable tag: 3.2.
    88License: GPLv3
    99License URI: https://github.com/woocommerce/woocommerce-admin/blob/main/license.txt
  • woocommerce-admin/trunk/src/Composer/Package.php

    r2683291 r2684108  
    2727     * @var string
    2828     */
    29     const VERSION = '3.2.0';
     29    const VERSION = '3.2.';
    3030
    3131    /**
  • woocommerce-admin/trunk/src/FeaturePlugin.php

    r2683291 r2684108  
    147147        // WARNING: Do not directly edit this version number constant.
    148148        // 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.' );
    150150    }
    151151
  • woocommerce-admin/trunk/src/Overrides/Order.php

    r2683291 r2684108  
    3434     * @var int
    3535     */
    36     protected $customer_id = null;
     36    p $customer_id = null;
    3737
    3838    /**
  • woocommerce-admin/trunk/src/Overrides/OrderRefund.php

    r2683291 r2684108  
    2626     * @var int
    2727     */
    28     protected $customer_id = null;
     28    p $customer_id = null;
    2929
    3030    /**
  • woocommerce-admin/trunk/vendor/autoload.php

    r2683291 r2684108  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInitb9d4dc43417ed5e4334742391b886954::getLoader();
     7return ComposerAutoloaderInit::getLoader();
  • woocommerce-admin/trunk/vendor/autoload_packages.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/composer/ClassLoader.php

    r2683291 r2684108  
    4343class ClassLoader
    4444{
    45     /** @var ?string */
    4645    private $vendorDir;
    4746
    4847    // PSR-4
    49     /**
    50      * @var array[]
    51      * @psalm-var array<string, array<string, int>>
    52      */
    5348    private $prefixLengthsPsr4 = array();
    54     /**
    55      * @var array[]
    56      * @psalm-var array<string, array<int, string>>
    57      */
    5849    private $prefixDirsPsr4 = array();
    59     /**
    60      * @var array[]
    61      * @psalm-var array<string, string>
    62      */
    6350    private $fallbackDirsPsr4 = array();
    6451
    6552    // PSR-0
    66     /**
    67      * @var array[]
    68      * @psalm-var array<string, array<string, string[]>>
    69      */
    7053    private $prefixesPsr0 = array();
    71     /**
    72      * @var array[]
    73      * @psalm-var array<string, string>
    74      */
    7554    private $fallbackDirsPsr0 = array();
    7655
    77     /** @var bool */
    7856    private $useIncludePath = false;
    79 
    80     /**
    81      * @var string[]
    82      * @psalm-var array<string, string>
    83      */
    8457    private $classMap = array();
    85 
    86     /** @var bool */
    8758    private $classMapAuthoritative = false;
    88 
    89     /**
    90      * @var bool[]
    91      * @psalm-var array<string, bool>
    92      */
    9359    private $missingClasses = array();
    94 
    95     /** @var ?string */
    9660    private $apcuPrefix;
    9761
    98     /**
    99      * @var self[]
    100      */
    10162    private static $registeredLoaders = array();
    10263
    103     /**
    104      * @param ?string $vendorDir
    105      */
    10664    public function __construct($vendorDir = null)
    10765    {
     
    10967    }
    11068
    111     /**
    112      * @return string[]
    113      */
    11469    public function getPrefixes()
    11570    {
     
    12176    }
    12277
    123     /**
    124      * @return array[]
    125      * @psalm-return array<string, array<int, string>>
    126      */
    12778    public function getPrefixesPsr4()
    12879    {
     
    13081    }
    13182
    132     /**
    133      * @return array[]
    134      * @psalm-return array<string, string>
    135      */
    13683    public function getFallbackDirs()
    13784    {
     
    13986    }
    14087
    141     /**
    142      * @return array[]
    143      * @psalm-return array<string, string>
    144      */
    14588    public function getFallbackDirsPsr4()
    14689    {
     
    14891    }
    14992
    150     /**
    151      * @return string[] Array of classname => path
    152      * @psalm-return array<string, string>
    153      */
    15493    public function getClassMap()
    15594    {
     
    15897
    15998    /**
    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
    164100     */
    165101    public function addClassMap(array $classMap)
     
    176112     * appending or prepending to the ones previously set for this prefix.
    177113     *
    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
    183117     */
    184118    public function add($prefix, $paths, $prepend = false)
     
    223157     * appending or prepending to the ones previously set for this namespace.
    224158     *
    225      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    226      * @param string[]|string $paths   The PSR-4 base directories
    227      * @param bool            $prepend Whether to prepend the directories
     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
    228162     *
    229163     * @throws \InvalidArgumentException
    230      *
    231      * @return void
    232164     */
    233165    public function addPsr4($prefix, $paths, $prepend = false)
     
    273205     * replacing any others previously set for this prefix.
    274206     *
    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
    279209     */
    280210    public function set($prefix, $paths)
     
    291221     * replacing any others previously set for this namespace.
    292222     *
    293      * @param string          $prefix The prefix/namespace, with trailing '\\'
    294      * @param string[]|string $paths  The PSR-4 base directories
     223     * @param string       $prefix The prefix/namespace, with trailing '\\'
     224     * @param |string $paths  The PSR-4 base directories
    295225     *
    296226     * @throws \InvalidArgumentException
    297      *
    298      * @return void
    299227     */
    300228    public function setPsr4($prefix, $paths)
     
    316244     *
    317245     * @param bool $useIncludePath
    318      *
    319      * @return void
    320246     */
    321247    public function setUseIncludePath($useIncludePath)
     
    340266     *
    341267     * @param bool $classMapAuthoritative
    342      *
    343      * @return void
    344268     */
    345269    public function setClassMapAuthoritative($classMapAuthoritative)
     
    362286     *
    363287     * @param string|null $apcuPrefix
    364      *
    365      * @return void
    366288     */
    367289    public function setApcuPrefix($apcuPrefix)
     
    384306     *
    385307     * @param bool $prepend Whether to prepend the autoloader or not
    386      *
    387      * @return void
    388308     */
    389309    public function register($prepend = false)
     
    405325    /**
    406326     * Unregisters this instance as an autoloader.
    407      *
    408      * @return void
    409327     */
    410328    public function unregister()
     
    421339     *
    422340     * @param  string    $class The name of the class
    423      * @return true|null True if loaded, null otherwise
     341     * @return |null True if loaded, null otherwise
    424342     */
    425343    public function loadClass($class)
     
    430348            return true;
    431349        }
    432 
    433         return null;
    434350    }
    435351
     
    486402    }
    487403
    488     /**
    489      * @param  string       $class
    490      * @param  string       $ext
    491      * @return string|false
    492      */
    493404    private function findFileWithExtension($class, $ext)
    494405    {
     
    562473 *
    563474 * Prevents access to $this/self from included files.
    564  *
    565  * @param  string $file
    566  * @return void
    567  * @private
    568475 */
    569476function includeFile($file)
  • woocommerce-admin/trunk/vendor/composer/InstalledVersions.php

    r2683291 r2684108  
    11<?php
    22
    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
    1212
    1313namespace Composer;
     
    1616use Composer\Semver\VersionParser;
    1717
    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
    2525class InstalledVersions
    2626{
    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 }
     27private 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);
     83private static $canGetVendors;
     84private static $installedByVendor = array();
     85
     86
     87
     88
     89
     90
     91
     92public static function getInstalledPackages()
     93{
     94$packages = array();
     95foreach (self::getInstalled() as $installed) {
     96$packages[] = array_keys($installed['versions']);
     97}
     98
     99if (1 === \count($packages)) {
     100return $packages[0];
     101}
     102
     103return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
     104}
     105
     106
     107
     108
     109
     110
     111
     112
     113
     114public static function isInstalled($packageName)
     115{
     116foreach (self::getInstalled() as $installed) {
     117if (isset($installed['versions'][$packageName])) {
     118return true;
     119}
     120}
     121
     122return false;
     123}
     124
     125
     126
     127
     128
     129
     130
     131
     132
     133
     134
     135
     136
     137
     138public static function satisfies(VersionParser $parser, $packageName, $constraint)
     139{
     140$constraint = $parser->parseConstraints($constraint);
     141$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
     142
     143return $provided->matches($constraint);
     144}
     145
     146
     147
     148
     149
     150
     151
     152
     153
     154
     155public static function getVersionRanges($packageName)
     156{
     157foreach (self::getInstalled() as $installed) {
     158if (!isset($installed['versions'][$packageName])) {
     159continue;
     160}
     161
     162$ranges = array();
     163if (isset($installed['versions'][$packageName]['pretty_version'])) {
     164$ranges[] = $installed['versions'][$packageName]['pretty_version'];
     165}
     166if (array_key_exists('aliases', $installed['versions'][$packageName])) {
     167$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
     168}
     169if (array_key_exists('replaced', $installed['versions'][$packageName])) {
     170$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
     171}
     172if (array_key_exists('provided', $installed['versions'][$packageName])) {
     173$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
     174}
     175
     176return implode(' || ', $ranges);
     177}
     178
     179throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     180}
     181
     182
     183
     184
     185
     186public static function getVersion($packageName)
     187{
     188foreach (self::getInstalled() as $installed) {
     189if (!isset($installed['versions'][$packageName])) {
     190continue;
     191}
     192
     193if (!isset($installed['versions'][$packageName]['version'])) {
     194return null;
     195}
     196
     197return $installed['versions'][$packageName]['version'];
     198}
     199
     200throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     201}
     202
     203
     204
     205
     206
     207public static function getPrettyVersion($packageName)
     208{
     209foreach (self::getInstalled() as $installed) {
     210if (!isset($installed['versions'][$packageName])) {
     211continue;
     212}
     213
     214if (!isset($installed['versions'][$packageName]['pretty_version'])) {
     215return null;
     216}
     217
     218return $installed['versions'][$packageName]['pretty_version'];
     219}
     220
     221throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     222}
     223
     224
     225
     226
     227
     228public static function getReference($packageName)
     229{
     230foreach (self::getInstalled() as $installed) {
     231if (!isset($installed['versions'][$packageName])) {
     232continue;
     233}
     234
     235if (!isset($installed['versions'][$packageName]['reference'])) {
     236return null;
     237}
     238
     239return $installed['versions'][$packageName]['reference'];
     240}
     241
     242throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     243}
     244
     245
     246
     247
     248
     249public static function getRootPackage()
     250{
     251$installed = self::getInstalled();
     252
     253return $installed[0]['root'];
     254}
     255
     256
     257
     258
     259
     260
     261
     262public static function getRawData()
     263{
     264return self::$installed;
     265}
     266
     267
     268
     269
     270
     271
     272
     273
     274
     275
     276
     277
     278
     279
     280
     281
     282
     283
     284
     285public static function reload($data)
     286{
     287self::$installed = $data;
     288self::$installedByVendor = array();
     289}
     290
     291
     292
     293
     294
     295private static function getInstalled()
     296{
     297if (null === self::$canGetVendors) {
     298self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
     299}
     300
     301$installed = array();
     302
     303if (self::$canGetVendors) {
     304foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
     305if (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
     315return $installed;
     316}
     317}
  • woocommerce-admin/trunk/vendor/composer/autoload_real.php

    r2683291 r2684108  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitb9d4dc43417ed5e4334742391b886954
     5class ComposerAutoloaderInit
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInitb9d4dc43417ed5e4334742391b886954', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    29         spl_autoload_unregister(array('ComposerAutoloaderInitb9d4dc43417ed5e4334742391b886954', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit', 'loadClassLoader'));
    3030
    3131        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3333            require __DIR__ . '/autoload_static.php';
    3434
    35             call_user_func(\Composer\Autoload\ComposerStaticInitb9d4dc43417ed5e4334742391b886954::getInitializer($loader));
     35            call_user_func(\Composer\Autoload\ComposerStaticInit::getInitializer($loader));
    3636        } else {
    3737            $map = require __DIR__ . '/autoload_namespaces.php';
  • woocommerce-admin/trunk/vendor/composer/autoload_static.php

    r2683291 r2684108  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitb9d4dc43417ed5e4334742391b886954
     7class ComposerStaticInit
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    4242    {
    4343        return \Closure::bind(function () use ($loader) {
    44             $loader->prefixLengthsPsr4 = ComposerStaticInitb9d4dc43417ed5e4334742391b886954::$prefixLengthsPsr4;
    45             $loader->prefixDirsPsr4 = ComposerStaticInitb9d4dc43417ed5e4334742391b886954::$prefixDirsPsr4;
    46             $loader->classMap = ComposerStaticInitb9d4dc43417ed5e4334742391b886954::$classMap;
     44            $loader->prefixLengthsPsr4 = ComposerStaticInit::$prefixLengthsPsr4;
     45            $loader->prefixDirsPsr4 = ComposerStaticInit::$prefixDirsPsr4;
     46            $loader->classMap = ComposerStaticInit::$classMap;
    4747
    4848        }, 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 (
    118    ),
    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',
    5222    ),
     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
    5356);
  • woocommerce-admin/trunk/vendor/composer/jetpack_autoload_psr4.php

    r2683291 r2684108  
    1212    ),
    1313    'Automattic\\WooCommerce\\Admin\\' => array(
    14         'version' => '3.2.0.0',
     14        'version' => '3.2..0',
    1515        'path'    => array( $baseDir . '/src' )
    1616    ),
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-autoloader-handler.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-autoloader-locator.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-autoloader.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-container.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-hook-manager.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-latest-autoloader-guard.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-manifest-reader.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-path-processor.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-php-autoloader.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-plugin-locator.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-plugins-handler.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-shutdown-handler.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-version-loader.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-version-selector.php

    r2683291 r2684108  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpb9d4dc43417ed5e4334742391b886954;
     8namespace Automattic\Jetpack\Autoloader\jp;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/woocommerce-admin.php

    r2683291 r2684108  
    88 * Text Domain: woocommerce-admin
    99 * Domain Path: /languages
    10  * Version: 3.2.0
     10 * Version: 3.2.
    1111 * Requires at least: 5.6
    1212 * Requires PHP: 7.0
Note: See TracChangeset for help on using the changeset viewer.