Plugin Directory

Changeset 2473439


Ignore:
Timestamp:
02/12/2021 01:54:02 AM (5 years ago)
Author:
psealock
Message:

Release v2.0.1

Location:
woocommerce-admin/trunk
Files:
2 added
10 deleted
39 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-admin/trunk/languages/woocommerce-admin.pot

    r2472837 r2473439  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WooCommerce Admin 2.0.0\n"
    6 "Report-Msgid-Bugs-To: "
    7 "https://wordpress.org/support/plugin/woocommerce-admin\n"
    8 "POT-Creation-Date: 2021-02-11 07:08:16+00:00\n"
     5"Project-Id-Version: WooCommerce Admin 2.0.1\n"
     6"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/temp-wc-admin\n"
     7"POT-Creation-Date: 2021-02-12 01:04:48+00:00\n"
    98"MIME-Version: 1.0\n"
    109"Content-Type: text/plain; charset=utf-8\n"
     
    27202719msgstr ""
    27212720
    2722 #: src/Features/Navigation/Menu.php:740
     2721#: src/Features/Navigation/Menu.php:743
    27232722msgid "WordPress Dashboard"
    27242723msgstr ""
  • woocommerce-admin/trunk/readme.txt

    r2472837 r2473439  
    55Tested up to: 5.6.0
    66Requires PHP: 7.0
    7 Stable tag: 2.0.0
     7Stable tag: 2.0.1
    88License: GPLv3
    99License URI: https://github.com/woocommerce/woocommerce-admin/blob/main/license.txt
  • woocommerce-admin/trunk/src/Composer/Package.php

    r2472837 r2473439  
    2525     * @var string
    2626     */
    27     const VERSION = '2.0.0';
     27    const VERSION = '2.0.1';
    2828
    2929    /**
  • woocommerce-admin/trunk/src/FeaturePlugin.php

    r2472837 r2473439  
    155155        // WARNING: Do not directly edit this version number constant.
    156156        // It is updated as part of the prebuild process from the package.json value.
    157         $this->define( 'WC_ADMIN_VERSION_NUMBER', '2.0.0' );
     157        $this->define( 'WC_ADMIN_VERSION_NUMBER', '2.0.1' );
    158158    }
    159159
  • woocommerce-admin/trunk/src/Features/Navigation/Menu.php

    r2472837 r2473439  
    9090        add_filter( 'admin_enqueue_scripts', array( $this, 'enqueue_data' ), 20 );
    9191
    92         add_filter( 'admin_menu', array( $this, 'migrate_core_child_items' ) );
    93         add_filter( 'admin_menu', array( $this, 'migrate_menu_items' ), PHP_INT_MAX - 1 );
     92        add_filter( 'admin_menu', array( $this, 'migrate_core_child_items' ), PHP_INT_MAX - 1 );
     93        add_filter( 'admin_menu', array( $this, 'migrate_menu_items' ), PHP_INT_MAX - 2 );
    9494    }
    9595
     
    619619        // Remove excluded submenu items
    620620        if ( isset( $submenu['woocommerce'] ) ) {
    621             $submenu['woocommerce'] = array_filter(
    622                 $submenu['woocommerce'],
    623                 function ( $submenu_item ) {
    624                     return ! in_array( $submenu_item[2], CoreMenu::get_excluded_items(), true );
     621            foreach ( $submenu['woocommerce'] as $key => $submenu_item ) {
     622                if ( in_array( $submenu_item[ self::CALLBACK ], CoreMenu::get_excluded_items(), true ) ) {
     623                    if ( isset( $submenu['woocommerce'][ $key ][ self::CSS_CLASSES ] ) ) {
     624                        $submenu['woocommerce'][ $key ][ self::CSS_CLASSES ] .= ' hide-if-js';
     625                    } else {
     626                        $submenu['woocommerce'][ $key ][] = 'hide-if-js';
     627                    }
    625628                }
    626             );
     629            }
    627630        }
    628631
  • woocommerce-admin/trunk/vendor/autoload.php

    r2472837 r2473439  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInita537f22e61b714db0c75a63174123add::getLoader();
     7return ComposerAutoloaderInit38b3d38eb0faab3eda1eac718e9ae633::getLoader();
  • woocommerce-admin/trunk/vendor/autoload_packages.php

    r2472837 r2473439  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpa537f22e61b714db0c75a63174123add;
     8namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/composer.json

    r2472837 r2473439  
    1818        }
    1919    },
    20     "extra": {
    21         "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin"
    22     },
    2320    "scripts": {
    2421        "phpunit": [
    2522            "@composer install",
    2623            "./vendor/phpunit/phpunit/phpunit --colors=always"
     24        ],
     25        "test-coverage": [
     26            "@composer install",
     27            "phpdbg -d memory_limit=2048M -d max_execution_time=900 -qrr ./vendor/bin/phpunit --coverage-clover \"$COVERAGE_DIR/clover.xml\""
     28        ],
     29        "test-php": [
     30            "@composer phpunit"
    2731        ]
    2832    },
    2933    "minimum-stability": "dev",
    30     "prefer-stable": true
     34    "prefer-stable": true,
     35    "extra": {
     36        "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin",
     37        "mirror-repo": "Automattic/jetpack-autoloader"
     38    }
    3139}
  • woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php

    r2472837 r2473439  
    138138     *
    139139     * @param  array $packageMap The package map.
     140     *
    140141     * @return array
    141142     */
  • woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php

    r2472837 r2473439  
    9999     */
    100100    public function postAutoloadDump( Event $event ) {
     101        // When the autoloader is not required by the root package we don't want to execute it.
     102        // This prevents unwanted transitive execution that generates unused autoloaders or
     103        // at worst throws fatal executions.
     104        if ( ! $this->isRequiredByRoot() ) {
     105            return;
     106        }
     107
    101108        $config = $this->composer->getConfig();
    102109
     
    159166    }
    160167
     168    /**
     169     * Checks to see whether or not the root package is the one that required the autoloader.
     170     *
     171     * @return bool
     172     */
     173    private function isRequiredByRoot() {
     174        $package  = $this->composer->getPackage();
     175        $requires = $package->getRequires();
     176        if ( ! is_array( $requires ) ) {
     177            $requires = array();
     178        }
     179        $devRequires = $package->getDevRequires();
     180        if ( ! is_array( $devRequires ) ) {
     181            $devRequires = array();
     182        }
     183        $requires = array_merge( $requires, $devRequires );
     184
     185        if ( empty( $requires ) ) {
     186            $this->io->writeError( "\n<error>The package is not required and this should never happen?</error>", true );
     187            exit();
     188        }
     189
     190        foreach ( $requires as $require ) {
     191            if ( 'automattic/jetpack-autoloader' === $require->getTarget() ) {
     192                return true;
     193            }
     194        }
     195
     196        return false;
     197    }
    161198}
  • woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-autoloader-handler.php

    r2472837 r2473439  
    11<?php
    22/* HEADER */ // phpcs:ignore
     3
     4use Automattic\Jetpack\Autoloader\AutoloadGenerator;
    35
    46/**
     
    68 */
    79class Autoloader_Handler {
     10
     11    /**
     12     * The PHP_Autoloader instance.
     13     *
     14     * @var PHP_Autoloader
     15     */
     16    private $php_autoloader;
    817
    918    /**
     
    3140     * The constructor.
    3241     *
     42     * @param PHP_Autoloader   $php_autoloader The PHP_Autoloader instance.
    3343     * @param Hook_Manager     $hook_manager The Hook_Manager instance.
    3444     * @param Manifest_Reader  $manifest_reader The Manifest_Reader instance.
    3545     * @param Version_Selector $version_selector The Version_Selector instance.
    3646     */
    37     public function __construct( $hook_manager, $manifest_reader, $version_selector ) {
     47    public function __construct( $php_autoloader, $hook_manager, $manifest_reader, $version_selector ) {
     48        $this->php_autoloader   = $php_autoloader;
    3849        $this->hook_manager     = $hook_manager;
    3950        $this->manifest_reader  = $manifest_reader;
     
    4253
    4354    /**
    44      * Creates an autoloader using the given plugins and activates it.
     55     * Checks to see whether or not an autoloader is currently in the process of initializing.
     56     *
     57     * @return bool
     58     */
     59    public function is_initializing() {
     60        // If no version has been set it means that no autoloader has started initializing yet.
     61        global $jetpack_autoloader_latest_version;
     62        if ( ! isset( $jetpack_autoloader_latest_version ) ) {
     63            return false;
     64        }
     65
     66        // When the version is set but the classmap is not it ALWAYS means that this is the
     67        // latest autoloader and is being included by an older one.
     68        global $jetpack_packages_classmap;
     69        if ( empty( $jetpack_packages_classmap ) ) {
     70            return true;
     71        }
     72
     73        // Version 2.4.0 added a new global and altered the reset semantics. We need to check
     74        // the other global as well since it may also point at initialization.
     75        // Note: We don't need to check for the class first because every autoloader that
     76        // will set the latest version global requires this class in the classmap.
     77        $replacing_version = $jetpack_packages_classmap[ AutoloadGenerator::class ]['version'];
     78        if ( $this->version_selector->is_dev_version( $replacing_version ) || version_compare( $replacing_version, '2.4.0.0', '>=' ) ) {
     79            global $jetpack_autoloader_loader;
     80            if ( ! isset( $jetpack_autoloader_loader ) ) {
     81                return true;
     82            }
     83        }
     84
     85        return false;
     86    }
     87
     88    /**
     89     * Activates an autoloader using the given plugins and activates it.
    4590     *
    4691     * @param string[] $plugins The plugins to initialize the autoloader for.
    4792     */
    48     public function create_autoloader( $plugins ) {
     93    public function activate_autoloader( $plugins ) {
    4994        global $jetpack_packages_psr4;
    5095        $jetpack_packages_psr4 = array();
     
    66111        );
    67112
    68         // Activate the autoloader.
    69         Autoloader::activate( $loader );
     113        $this->php_autoloader->register_autoloader( $loader );
     114
     115        // Now that the autoloader is active we can load the filemap.
     116        $loader->load_filemap();
    70117    }
    71118
     
    74121     */
    75122    public function reset_autoloader() {
    76         global $jetpack_autoloader_loader;
     123        $this->php_autoloader->unregister_autoloader();
     124        $this->hook_manager->reset();
     125
     126        // Clear all of the autoloader globals so that older autoloaders don't do anything strange.
    77127        global $jetpack_autoloader_latest_version;
     128        $jetpack_autoloader_latest_version = null;
    78129
    79         $this->hook_manager->reset();
    80         $jetpack_autoloader_loader         = null;
    81         $jetpack_autoloader_latest_version = null;
     130        global $jetpack_packages_classmap;
     131        $jetpack_packages_classmap = array(); // Must be array to avoid exceptions in old autoloaders!
     132
     133        global $jetpack_packages_psr4;
     134        $jetpack_packages_psr4 = array(); // Must be array to avoid exceptions in old autoloaders!
     135
     136        global $jetpack_packages_filemap;
     137        $jetpack_packages_filemap = array(); // Must be array to avoid exceptions in old autoloaders!
    82138    }
    83139}
  • woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-autoloader-locator.php

    r2421790 r2473439  
    22/* HEADER */ // phpcs:ignore
    33
    4 use \Automattic\Jetpack\Autoloader\AutoloadGenerator;
     4use Automattic\Jetpack\Autoloader\AutoloadGenerator;
    55
    66/**
  • woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-autoloader.php

    r2472837 r2473439  
    2323        // phpcs:disable Generic.Commenting.DocComment.MissingShort
    2424
     25        /** @var Autoloader_Handler $autoloader_handler */
     26        $autoloader_handler = $container->get( Autoloader_Handler::class );
     27
     28        // If the autoloader is already initializing it means that it has included us as the latest.
     29        $was_included_by_autoloader = $autoloader_handler->is_initializing();
     30
    2531        /** @var Plugin_Locator $plugin_locator */
    2632        $plugin_locator = $container->get( Plugin_Locator::class );
     
    3238        $current_plugin = $plugin_locator->find_current_plugin();
    3339
     40        // The active plugins are those that we were able to discover on the site. This list will not
     41        // include mu-plugins, those activated by code, or those who are hidden by filtering. We also
     42        // want to take care to not consider the current plugin unknown if it was included by an
     43        // autoloader. This avoids the case where a plugin will be marked "active" while deactivated
     44        // due to it having the latest autoloader.
     45        $active_plugins = $plugins_handler->get_active_plugins( true, ! $was_included_by_autoloader );
     46
    3447        // The cached plugins are all of those that were active or discovered by the autoloader during a previous request.
    3548        // Note that it's possible this list will include plugins that have since been deactivated, but after a request
     
    3750        $cached_plugins = $plugins_handler->get_cached_plugins();
    3851
    39         // The active plugins are those that we were able to discover in on the site. This list will not include
    40         // mu-plugins, those activated by code, or those who are hidden by filtering.
    41         // By combining these lists we can preemptively load classes for plugins that are activated via another method.
    42         // While this may result in us considering packages in deactivated plugins the request after they're removed,
    43         // there shouldn't be any problems as a result and the eventual consistency is reliable enough.
    44         $all_plugins = array_values( array_unique( array_merge( $plugins_handler->get_active_plugins(), $cached_plugins ) ) );
     52        // We combine the active list and cached list to preemptively load classes for plugins that are
     53        // presently unknown but will be loaded during the request. While this may result in us considering packages in
     54        // deactivated plugins there shouldn't be any problems as a result and the eventual consistency is sufficient.
     55        $all_plugins = array_merge( $active_plugins, $cached_plugins );
     56
     57        // In particular we also include the current plugin to address the case where it is the latest autoloader
     58        // but also unknown (and not cached). We don't want it in the active list because we don't know that it
     59        // is active but we need it in the all plugins list so that it is considered by the autoloader.
     60        $all_plugins[] = $current_plugin;
     61
     62        // We require uniqueness in the array to avoid processing the same plugin more than once.
     63        $all_plugins = array_values( array_unique( $all_plugins ) );
    4564
    4665        /** @var Latest_Autoloader_Guard $guard */
    4766        $guard = $container->get( Latest_Autoloader_Guard::class );
    48         if ( $guard->should_stop_init( $current_plugin, $all_plugins ) ) {
     67        if ( $guard->should_stop_init( $current_plugin, $all_plugins, $was_included_by_autoloader ) ) {
    4968            return;
    5069        }
    5170
    52         /** @var Autoloader_Handler $autoloader_handler */
    53         $autoloader_handler = $container->get( Autoloader_Handler::class );
    54 
    5571        // Initialize the autoloader using the handler now that we're ready.
    56         $autoloader_handler->create_autoloader( $all_plugins );
     72        $autoloader_handler->activate_autoloader( $all_plugins );
    5773
    5874        /** @var Hook_Manager $hook_manager */
     
    6480        $hook_manager->add_action(
    6581            'shutdown',
    66             function () use ( $plugins_handler, $cached_plugins ) {
     82            function () use ( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) {
    6783                // Don't save a broken cache if an error happens during some plugin's initialization.
    6884                if ( ! did_action( 'plugins_loaded' ) ) {
     
    7591                }
    7692
    77                 // Load the active plugins fresh since the list we have above might not contain
     93                // Load the active plugins fresh since the list we pulled earlier might not contain
    7894                // plugins that were activated but did not reset the autoloader. This happens
    79                 // because they were already included in the cache.
    80                 $active_plugins = $plugins_handler->get_active_plugins();
     95                // when a plugin is in the cache but not "active" when the autoloader loads.
     96                // We also want to make sure that plugins which are deactivating are not
     97                // considered "active" so that they will be removed from the cache now.
     98                $active_plugins = $plugins_handler->get_active_plugins( false, ! $was_included_by_autoloader );
    8199
    82100                // The paths should be sorted for easy comparisons with those loaded from the cache.
     
    95113        // phpcs:enable Generic.Commenting.DocComment.MissingShort
    96114    }
    97 
    98     /**
    99      * Loads a class file if one could be found.
    100      *
    101      * @param string $class_name The name of the class to autoload.
    102      *
    103      * @return bool Indicates whether or not a class file was loaded.
    104      */
    105     public static function load_class( $class_name ) {
    106         global $jetpack_autoloader_loader;
    107         if ( ! isset( $jetpack_autoloader_loader ) ) {
    108             return;
    109         }
    110 
    111         $file = $jetpack_autoloader_loader->find_class_file( $class_name );
    112         if ( ! isset( $file ) ) {
    113             return false;
    114         }
    115 
    116         require $file;
    117         return true;
    118     }
    119 
    120     /**
    121      * Activates this autoloader and deactivates any other v2 autoloaders that may be present.
    122      *
    123      * @param Version_Loader $version_loader The version loader for our autoloader.
    124      */
    125     public static function activate( $version_loader ) {
    126         // Set the global autoloader to indicate that we've activated this autoloader.
    127         global $jetpack_autoloader_loader;
    128         $jetpack_autoloader_loader = $version_loader;
    129 
    130         // Remove any v2 autoloader that we've already registered.
    131         $autoload_chain = spl_autoload_functions();
    132         foreach ( $autoload_chain as $autoloader ) {
    133             // Jetpack autoloaders are always strings.
    134             if ( ! is_string( $autoloader ) ) {
    135                 continue;
    136             }
    137 
    138             // We can identify a v2 autoloader using the namespace prefix without the unique suffix.
    139             if ( 'Automattic\\Jetpack\\Autoloader\\jp' === substr( $autoloader, 0, 32 ) ) {
    140                 spl_autoload_unregister( $autoloader );
    141                 continue;
    142             }
    143         }
    144 
    145         // Ensure that the autoloader is first to avoid contention with others.
    146         spl_autoload_register( self::class . '::load_class', true, true );
    147 
    148         // Now that we've activated the autoloader we should load the filemap.
    149         $jetpack_autoloader_loader->load_filemap();
    150     }
    151115}
  • woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-container.php

    r2472837 r2473439  
    8888        );
    8989
     90        require_once __DIR__ . '/class-php-autoloader.php';
     91        $this->dependencies[ PHP_Autoloader::class ] = new PHP_Autoloader();
     92
    9093        require_once __DIR__ . '/class-manifest-reader.php';
    9194        $this->dependencies[ Manifest_Reader::class ] = new Manifest_Reader(
     
    101104        require_once __DIR__ . '/class-autoloader-handler.php';
    102105        $this->dependencies[ Autoloader_Handler::class ] = new Autoloader_Handler(
     106            $this->get( PHP_Autoloader::class ),
    103107            $this->get( Hook_Manager::class ),
    104108            $this->get( Manifest_Reader::class ),
     
    121125     */
    122126    private function initialize_globals() {
     127        /*
     128         * This global was retired in version 2.9. The value is set to 'false' to maintain
     129         * compatibility with older versions of the autoloader.
     130         */
     131        global $jetpack_autoloader_including_latest;
     132        $jetpack_autoloader_including_latest = false;
     133
    123134        // Not all plugins can be found using the locator. In cases where a plugin loads the autoloader
    124135        // but was not discoverable, we will record them in this array to track them as "active".
     
    127138            $jetpack_autoloader_activating_plugins_paths = array();
    128139        }
    129 
    130         // Since older autoloaders include newer ones, we need to be able to tell the difference between an
    131         // inclusion via autoloader and an inclusion via plugin file. This allows the autoloader to
    132         // perform special tasks for each kind of inclusion.
    133         global $jetpack_autoloader_including_latest;
    134         if ( ! isset( $jetpack_autoloader_including_latest ) ) {
    135             // If the latest version global has been set but the including latest hasn't, it means that an
    136             // older autoloader without support for the global is including us.
    137             global $jetpack_autoloader_latest_version;
    138             $jetpack_autoloader_including_latest = isset( $jetpack_autoloader_latest_version );
    139         }
    140140    }
    141141}
  • woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php

    r2472837 r2473439  
    4646     * is not it.
    4747     *
    48      * @param string   $current_plugin The current plugin we're checking.
    49      * @param string[] $plugins        The active plugins to check for autoloaders in.
     48     * @param string   $current_plugin             The current plugin we're checking.
     49     * @param string[] $plugins                    The active plugins to check for autoloaders in.
     50     * @param bool     $was_included_by_autoloader Indicates whether or not this autoloader was included by another.
    5051     *
    5152     * @return bool True if we should stop initialization, otherwise false.
    5253     */
    53     public function should_stop_init( $current_plugin, $plugins ) {
    54         global $jetpack_autoloader_including_latest;
     54    public function should_stop_init( $current_plugin, $plugins, $was_included_by_autoloader ) {
    5555        global $jetpack_autoloader_latest_version;
    56 
    57         // When we're being included from an older autoloader we need to
    58         // reset the latest version so that the new autoloader can look
    59         // for the latest autoloader again.
    60         if ( $jetpack_autoloader_including_latest ) {
    61             $jetpack_autoloader_latest_version = null;
    62         }
    6356
    6457        // We need to reset the autoloader when the plugins change because
     
    6861        }
    6962
    70         // Don't bother initializing the autoloader if it already has been.
    71         if ( isset( $jetpack_autoloader_latest_version ) ) {
     63        // When the latest autoloader has already been found we don't need to search for it again.
     64        // We should take care however because this will also trigger if the autoloader has been
     65        // included by an older one.
     66        if ( isset( $jetpack_autoloader_latest_version ) && ! $was_included_by_autoloader ) {
    7267            return true;
    7368        }
     
    7570        $latest_plugin = $this->autoloader_locator->find_latest_autoloader( $plugins, $jetpack_autoloader_latest_version );
    7671        if ( isset( $latest_plugin ) && $latest_plugin !== $current_plugin ) {
    77             $jetpack_autoloader_including_latest = true;
    7872            require $this->autoloader_locator->get_autoloader_path( $latest_plugin );
    79             $jetpack_autoloader_including_latest = false;
    8073            return true;
    8174        }
  • woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-path-processor.php

    r2472837 r2473439  
    1010     *
    1111     * @param string $path The path we want to process.
     12     *
    1213     * @return string The tokenized path.
    1314     */
     
    3233     *
    3334     * @param string $tokenized_path The path we want to process.
     35     *
    3436     * @return string The expanded path.
    3537     */
     
    5759     * @param string $file The plugin or theme file to resolve.
    5860     * @param array  $directories_to_check The directories we should check for the file if it isn't an absolute path.
     61     *
    5962     * @return string|false Returns the absolute path to the directory, otherwise false.
    6063     */
     
    115118     *
    116119     * @param string $path The path to check.
     120     *
    117121     * @return bool True if the path is absolute, otherwise false.
    118122     */
  • woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-plugin-locator.php

    r2472837 r2473439  
    2727     *
    2828     * @return string $path The path to the current plugin.
     29     *
    2930     * @throws \RuntimeException If the current plugin does not have an autoloader.
    3031     */
     
    5152     */
    5253    public function find_using_option( $option_name, $site_option = false ) {
    53         $raw = $site_option ? get_site_option( $option_name, array() ) : get_option( $option_name, array() );
    54         if ( empty( $raw ) ) {
     54        $raw = $site_option ? get_site_option( $option_name ) : get_option( $option_name );
     55        if ( false === $raw ) {
    5556            return array();
    5657        }
     
    6061
    6162    /**
    62      * Checks for plugins that are being activated in this request and returns all that it finds.
     63     * Checks for plugins in the `action` request parameter.
     64     *
     65     * @param string[] $allowed_actions The actions that we're allowed to return plugins for.
    6366     *
    6467     * @return array $plugin_paths The list of absolute paths we've found.
    6568     */
    66     public function find_activating_this_request() {
     69    public function find_using_request_action( $allowed_actions ) {
    6770        // phpcs:disable WordPress.Security.NonceVerification.Recommended
    6871
     
    7881        }
    7982
     83        $action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false;
     84        if ( ! in_array( $action, $allowed_actions, true ) ) {
     85            return array();
     86        }
     87
    8088        $plugin_slugs = array();
    81 
    82         $action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false;
    8389        switch ( $action ) {
    8490            case 'activate':
     91            case 'deactivate':
    8592                if ( empty( $_REQUEST['plugin'] ) ) {
    8693                    break;
     
    9198
    9299            case 'activate-selected':
     100            case 'deactivate-selected':
    93101                if ( empty( $_REQUEST['checked'] ) ) {
    94102                    break;
     
    99107        }
    100108
     109        // phpcs:enable WordPress.Security.NonceVerification.Recommended
    101110        return $this->convert_plugins_to_paths( $plugin_slugs );
    102111    }
     
    112121     */
    113122    private function convert_plugins_to_paths( $plugins ) {
     123        if ( ! is_array( $plugins ) || empty( $plugins ) ) {
     124            return array();
     125        }
     126
    114127        // We're going to look for plugins in the standard directories.
    115128        $path_constants = array( WP_PLUGIN_DIR, WPMU_PLUGIN_DIR );
  • woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-plugins-handler.php

    r2472837 r2473439  
    3939     * Gets all of the active plugins we can find.
    4040     *
     41     * @param bool $include_deactivating When true, plugins deactivating this request will be considered active.
     42     * @param bool $record_unknown When true, the current plugin will be marked as active and recorded when unknown.
     43     *
    4144     * @return string[]
    4245     */
    43     public function get_active_plugins() {
     46    public function get_active_plugins( $include_deactivating, $record_unknown ) {
    4447        global $jetpack_autoloader_activating_plugins_paths;
    45         global $jetpack_autoloader_including_latest;
    4648
    4749        // We're going to build a unique list of plugins from a few different sources
     
    7476        }
    7577
    76         $plugins = $this->plugin_locator->find_activating_this_request();
     78        // These actions contain plugins that are being activated/deactivated during this request.
     79        $plugins = $this->plugin_locator->find_using_request_action( array( 'activate', 'activate-selected', 'deactivate', 'deactivate-selected' ) );
    7780        foreach ( $plugins as $path ) {
    7881            $active_plugins[ $path ] = $path;
     
    8790        // been changed since it was saved in the global.
    8891        $current_plugin = $this->plugin_locator->find_current_plugin();
    89         if ( ! in_array( $current_plugin, $active_plugins, true ) && ! $jetpack_autoloader_including_latest ) {
     92        if ( $record_unknown && ! in_array( $current_plugin, $active_plugins, true ) ) {
    9093            $active_plugins[ $current_plugin ]             = $current_plugin;
    9194            $jetpack_autoloader_activating_plugins_paths[] = $current_plugin;
     95        }
     96
     97        // When deactivating plugins aren't desired we should entirely remove them from the active list.
     98        if ( ! $include_deactivating ) {
     99            // These actions contain plugins that are being deactivated during this request.
     100            $plugins = $this->plugin_locator->find_using_request_action( array( 'deactivate', 'deactivate-selected' ) );
     101            foreach ( $plugins as $path ) {
     102                unset( $active_plugins[ $path ] );
     103            }
    92104        }
    93105
     
    103115    public function get_cached_plugins() {
    104116        $cached = get_transient( self::TRANSIENT_KEY );
    105         if ( false === $cached ) {
     117        if ( ! is_array( $cached ) || empty( $cached ) ) {
    106118            return array();
    107119        }
     
    135147        global $jetpack_autoloader_cached_plugin_paths;
    136148
    137         // When no autoloader has executed there is nothing to have changed.
    138         if ( ! isset( $jetpack_autoloader_cached_plugin_paths ) ) {
    139             $jetpack_autoloader_cached_plugin_paths = $plugins;
    140             return false;
    141         }
    142 
    143149        if ( $jetpack_autoloader_cached_plugin_paths !== $plugins ) {
    144150            $jetpack_autoloader_cached_plugin_paths = $plugins;
  • woocommerce-admin/trunk/vendor/automattic/jetpack-autoloader/src/class-version-selector.php

    r2472837 r2473439  
    2626        }
    2727
    28         if ( $use_dev_versions && $this->is_package_version_dev( $selected_version ) ) {
     28        if ( $use_dev_versions && $this->is_dev_version( $selected_version ) ) {
    2929            return false;
    3030        }
    3131
    32         if ( $this->is_package_version_dev( $compare_version ) ) {
     32        if ( $this->is_dev_version( $compare_version ) ) {
    3333            if ( $use_dev_versions ) {
    3434                return true;
     
    5252     * @return bool True if the version is a dev version, else false.
    5353     */
    54     private function is_package_version_dev( $version ) {
     54    public function is_dev_version( $version ) {
    5555        if ( 'dev-' === substr( $version, 0, 4 ) || '9999999-dev' === $version ) {
    5656            return true;
  • woocommerce-admin/trunk/vendor/composer/ClassLoader.php

    r2472837 r2473439  
    3838 * @author Fabien Potencier <fabien@symfony.com>
    3939 * @author Jordi Boggiano <j.boggiano@seld.be>
    40  * @see    https://www.php-fig.org/psr/psr-0/
    41  * @see    https://www.php-fig.org/psr/psr-4/
     40 * @see    http://www.php-fig.org/psr/psr-0/
     41 * @see    http://www.php-fig.org/psr/psr-4/
    4242 */
    4343class ClassLoader
    4444{
    45     private $vendorDir;
    46 
    4745    // PSR-4
    4846    private $prefixLengthsPsr4 = array();
     
    5957    private $missingClasses = array();
    6058    private $apcuPrefix;
    61 
    62     private static $registeredLoaders = array();
    63 
    64     public function __construct($vendorDir = null)
    65     {
    66         $this->vendorDir = $vendorDir;
    67     }
    6859
    6960    public function getPrefixes()
     
    310301    {
    311302        spl_autoload_register(array($this, 'loadClass'), true, $prepend);
    312 
    313         if (null === $this->vendorDir) {
    314             //no-op
    315         } elseif ($prepend) {
    316             self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
    317         } else {
    318             unset(self::$registeredLoaders[$this->vendorDir]);
    319             self::$registeredLoaders[$this->vendorDir] = $this;
    320         }
    321303    }
    322304
     
    327309    {
    328310        spl_autoload_unregister(array($this, 'loadClass'));
    329 
    330         if (null !== $this->vendorDir) {
    331             unset(self::$registeredLoaders[$this->vendorDir]);
    332         }
    333311    }
    334312
     
    388366
    389367        return $file;
    390     }
    391 
    392     /**
    393      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    394      *
    395      * @return self[]
    396      */
    397     public static function getRegisteredLoaders()
    398     {
    399         return self::$registeredLoaders;
    400368    }
    401369
  • woocommerce-admin/trunk/vendor/composer/autoload_classmap.php

    r2472837 r2473439  
    88return array(
    99    'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php',
    10     'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
    1110);
  • woocommerce-admin/trunk/vendor/composer/autoload_real.php

    r2472837 r2473439  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInita537f22e61b714db0c75a63174123add
     5class ComposerAutoloaderInit38b3d38eb0faab3eda1eac718e9ae633
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         require __DIR__ . '/platform_check.php';
    26 
    27         spl_autoload_register(array('ComposerAutoloaderInita537f22e61b714db0c75a63174123add', 'loadClassLoader'), true, true);
    28         self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    29         spl_autoload_unregister(array('ComposerAutoloaderInita537f22e61b714db0c75a63174123add', 'loadClassLoader'));
     25        spl_autoload_register(array('ComposerAutoloaderInit38b3d38eb0faab3eda1eac718e9ae633', 'loadClassLoader'), true, true);
     26        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     27        spl_autoload_unregister(array('ComposerAutoloaderInit38b3d38eb0faab3eda1eac718e9ae633', 'loadClassLoader'));
    3028
    3129        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
    3230        if ($useStaticLoader) {
    33             require __DIR__ . '/autoload_static.php';
     31            require_once __DIR__ . '/autoload_static.php';
    3432
    35             call_user_func(\Composer\Autoload\ComposerStaticInita537f22e61b714db0c75a63174123add::getInitializer($loader));
     33            call_user_func(\Composer\Autoload\ComposerStaticInit38b3d38eb0faab3eda1eac718e9ae633::getInitializer($loader));
    3634        } else {
    3735            $map = require __DIR__ . '/autoload_namespaces.php';
  • woocommerce-admin/trunk/vendor/composer/autoload_static.php

    r2472837 r2473439  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInita537f22e61b714db0c75a63174123add
     7class ComposerStaticInit38b3d38eb0faab3eda1eac718e9ae633
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3636    public static $classMap = array (
    3737        'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php',
    38         'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
    3938    );
    4039
     
    4241    {
    4342        return \Closure::bind(function () use ($loader) {
    44             $loader->prefixLengthsPsr4 = ComposerStaticInita537f22e61b714db0c75a63174123add::$prefixLengthsPsr4;
    45             $loader->prefixDirsPsr4 = ComposerStaticInita537f22e61b714db0c75a63174123add::$prefixDirsPsr4;
    46             $loader->classMap = ComposerStaticInita537f22e61b714db0c75a63174123add::$classMap;
     43            $loader->prefixLengthsPsr4 = ComposerStaticInit38b3d38eb0faab3eda1eac718e9ae633::$prefixLengthsPsr4;
     44            $loader->prefixDirsPsr4 = ComposerStaticInit38b3d38eb0faab3eda1eac718e9ae633::$prefixDirsPsr4;
     45            $loader->classMap = ComposerStaticInit38b3d38eb0faab3eda1eac718e9ae633::$classMap;
    4746
    4847        }, null, ClassLoader::class);
  • woocommerce-admin/trunk/vendor/composer/installed.json

    r2472837 r2473439  
    1 {
    2     "packages": [
    3         {
    4             "name": "automattic/jetpack-autoloader",
    5             "version": "v2.7.1",
    6             "version_normalized": "2.7.1.0",
    7             "source": {
    8                 "type": "git",
    9                 "url": "https://github.com/Automattic/jetpack-autoloader.git",
    10                 "reference": "5437697a56aefbdf707849b9833e1b36093d7a73"
     1[
     2    {
     3        "name": "automattic/jetpack-autoloader",
     4        "version": "v2.9.1",
     5        "version_normalized": "2.9.1.0",
     6        "source": {
     7            "type": "git",
     8            "url": "https://github.com/Automattic/jetpack-autoloader.git",
     9            "reference": "d6ca2cc26ad6963e1be19b3338a9e98f40d9bd88"
     10        },
     11        "dist": {
     12            "type": "zip",
     13            "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/d6ca2cc26ad6963e1be19b3338a9e98f40d9bd88",
     14            "reference": "d6ca2cc26ad6963e1be19b3338a9e98f40d9bd88",
     15            "shasum": ""
     16        },
     17        "require": {
     18            "composer-plugin-api": "^1.1 || ^2.0"
     19        },
     20        "require-dev": {
     21            "yoast/phpunit-polyfills": "0.2.0"
     22        },
     23        "time": "2021-02-05T19:07:06+00:00",
     24        "type": "composer-plugin",
     25        "extra": {
     26            "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin",
     27            "mirror-repo": "Automattic/jetpack-autoloader"
     28        },
     29        "installation-source": "dist",
     30        "autoload": {
     31            "classmap": [
     32                "src/AutoloadGenerator.php"
     33            ],
     34            "psr-4": {
     35                "Automattic\\Jetpack\\Autoloader\\": "src"
     36            }
     37        },
     38        "notification-url": "https://packagist.org/downloads/",
     39        "license": [
     40            "GPL-2.0-or-later"
     41        ],
     42        "description": "Creates a custom autoloader for a plugin or theme."
     43    },
     44    {
     45        "name": "composer/installers",
     46        "version": "v1.9.0",
     47        "version_normalized": "1.9.0.0",
     48        "source": {
     49            "type": "git",
     50            "url": "https://github.com/composer/installers.git",
     51            "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca"
     52        },
     53        "dist": {
     54            "type": "zip",
     55            "url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
     56            "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
     57            "shasum": ""
     58        },
     59        "require": {
     60            "composer-plugin-api": "^1.0 || ^2.0"
     61        },
     62        "replace": {
     63            "roundcube/plugin-installer": "*",
     64            "shama/baton": "*"
     65        },
     66        "require-dev": {
     67            "composer/composer": "1.6.* || 2.0.*@dev",
     68            "composer/semver": "1.0.* || 2.0.*@dev",
     69            "phpunit/phpunit": "^4.8.36",
     70            "sebastian/comparator": "^1.2.4",
     71            "symfony/process": "^2.3"
     72        },
     73        "time": "2020-04-07T06:57:05+00:00",
     74        "type": "composer-plugin",
     75        "extra": {
     76            "class": "Composer\\Installers\\Plugin",
     77            "branch-alias": {
     78                "dev-master": "1.0-dev"
     79            }
     80        },
     81        "installation-source": "dist",
     82        "autoload": {
     83            "psr-4": {
     84                "Composer\\Installers\\": "src/Composer/Installers"
     85            }
     86        },
     87        "notification-url": "https://packagist.org/downloads/",
     88        "license": [
     89            "MIT"
     90        ],
     91        "authors": [
     92            {
     93                "name": "Kyle Robinson Young",
     94                "email": "kyle@dontkry.com",
     95                "homepage": "https://github.com/shama"
     96            }
     97        ],
     98        "description": "A multi-framework Composer library installer",
     99        "homepage": "https://composer.github.io/installers/",
     100        "keywords": [
     101            "Craft",
     102            "Dolibarr",
     103            "Eliasis",
     104            "Hurad",
     105            "ImageCMS",
     106            "Kanboard",
     107            "Lan Management System",
     108            "MODX Evo",
     109            "MantisBT",
     110            "Mautic",
     111            "Maya",
     112            "OXID",
     113            "Plentymarkets",
     114            "Porto",
     115            "RadPHP",
     116            "SMF",
     117            "Thelia",
     118            "Whmcs",
     119            "WolfCMS",
     120            "agl",
     121            "aimeos",
     122            "annotatecms",
     123            "attogram",
     124            "bitrix",
     125            "cakephp",
     126            "chef",
     127            "cockpit",
     128            "codeigniter",
     129            "concrete5",
     130            "croogo",
     131            "dokuwiki",
     132            "drupal",
     133            "eZ Platform",
     134            "elgg",
     135            "expressionengine",
     136            "fuelphp",
     137            "grav",
     138            "installer",
     139            "itop",
     140            "joomla",
     141            "known",
     142            "kohana",
     143            "laravel",
     144            "lavalite",
     145            "lithium",
     146            "magento",
     147            "majima",
     148            "mako",
     149            "mediawiki",
     150            "modulework",
     151            "modx",
     152            "moodle",
     153            "osclass",
     154            "phpbb",
     155            "piwik",
     156            "ppi",
     157            "puppet",
     158            "pxcms",
     159            "reindex",
     160            "roundcube",
     161            "shopware",
     162            "silverstripe",
     163            "sydes",
     164            "sylius",
     165            "symfony",
     166            "typo3",
     167            "wordpress",
     168            "yawik",
     169            "zend",
     170            "zikula"
     171        ],
     172        "support": {
     173            "issues": "https://github.com/composer/installers/issues",
     174            "source": "https://github.com/composer/installers/tree/v1.9.0"
     175        },
     176        "funding": [
     177            {
     178                "url": "https://packagist.com",
     179                "type": "custom"
    11180            },
    12             "dist": {
    13                 "type": "zip",
    14                 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/5437697a56aefbdf707849b9833e1b36093d7a73",
    15                 "reference": "5437697a56aefbdf707849b9833e1b36093d7a73",
    16                 "shasum": ""
    17             },
    18             "require": {
    19                 "composer-plugin-api": "^1.1 || ^2.0"
    20             },
    21             "require-dev": {
    22                 "yoast/phpunit-polyfills": "0.2.0"
    23             },
    24             "time": "2020-12-18T22:33:59+00:00",
    25             "type": "composer-plugin",
    26             "extra": {
    27                 "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin"
    28             },
    29             "installation-source": "dist",
    30             "autoload": {
    31                 "classmap": [
    32                     "src/AutoloadGenerator.php"
    33                 ],
    34                 "psr-4": {
    35                     "Automattic\\Jetpack\\Autoloader\\": "src"
    36                 }
    37             },
    38             "notification-url": "https://packagist.org/downloads/",
    39             "license": [
    40                 "GPL-2.0-or-later"
    41             ],
    42             "description": "Creates a custom autoloader for a plugin or theme.",
    43             "support": {
    44                 "source": "https://github.com/Automattic/jetpack-autoloader/tree/v2.7.1"
    45             },
    46             "install-path": "../automattic/jetpack-autoloader"
    47         },
    48         {
    49             "name": "composer/installers",
    50             "version": "v1.9.0",
    51             "version_normalized": "1.9.0.0",
    52             "source": {
    53                 "type": "git",
    54                 "url": "https://github.com/composer/installers.git",
    55                 "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca"
    56             },
    57             "dist": {
    58                 "type": "zip",
    59                 "url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
    60                 "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
    61                 "shasum": ""
    62             },
    63             "require": {
    64                 "composer-plugin-api": "^1.0 || ^2.0"
    65             },
    66             "replace": {
    67                 "roundcube/plugin-installer": "*",
    68                 "shama/baton": "*"
    69             },
    70             "require-dev": {
    71                 "composer/composer": "1.6.* || 2.0.*@dev",
    72                 "composer/semver": "1.0.* || 2.0.*@dev",
    73                 "phpunit/phpunit": "^4.8.36",
    74                 "sebastian/comparator": "^1.2.4",
    75                 "symfony/process": "^2.3"
    76             },
    77             "time": "2020-04-07T06:57:05+00:00",
    78             "type": "composer-plugin",
    79             "extra": {
    80                 "class": "Composer\\Installers\\Plugin",
    81                 "branch-alias": {
    82                     "dev-master": "1.0-dev"
    83                 }
    84             },
    85             "installation-source": "dist",
    86             "autoload": {
    87                 "psr-4": {
    88                     "Composer\\Installers\\": "src/Composer/Installers"
    89                 }
    90             },
    91             "notification-url": "https://packagist.org/downloads/",
    92             "license": [
    93                 "MIT"
    94             ],
    95             "authors": [
    96                 {
    97                     "name": "Kyle Robinson Young",
    98                     "email": "kyle@dontkry.com",
    99                     "homepage": "https://github.com/shama"
    100                 }
    101             ],
    102             "description": "A multi-framework Composer library installer",
    103             "homepage": "https://composer.github.io/installers/",
    104             "keywords": [
    105                 "Craft",
    106                 "Dolibarr",
    107                 "Eliasis",
    108                 "Hurad",
    109                 "ImageCMS",
    110                 "Kanboard",
    111                 "Lan Management System",
    112                 "MODX Evo",
    113                 "MantisBT",
    114                 "Mautic",
    115                 "Maya",
    116                 "OXID",
    117                 "Plentymarkets",
    118                 "Porto",
    119                 "RadPHP",
    120                 "SMF",
    121                 "Thelia",
    122                 "Whmcs",
    123                 "WolfCMS",
    124                 "agl",
    125                 "aimeos",
    126                 "annotatecms",
    127                 "attogram",
    128                 "bitrix",
    129                 "cakephp",
    130                 "chef",
    131                 "cockpit",
    132                 "codeigniter",
    133                 "concrete5",
    134                 "croogo",
    135                 "dokuwiki",
    136                 "drupal",
    137                 "eZ Platform",
    138                 "elgg",
    139                 "expressionengine",
    140                 "fuelphp",
    141                 "grav",
    142                 "installer",
    143                 "itop",
    144                 "joomla",
    145                 "known",
    146                 "kohana",
    147                 "laravel",
    148                 "lavalite",
    149                 "lithium",
    150                 "magento",
    151                 "majima",
    152                 "mako",
    153                 "mediawiki",
    154                 "modulework",
    155                 "modx",
    156                 "moodle",
    157                 "osclass",
    158                 "phpbb",
    159                 "piwik",
    160                 "ppi",
    161                 "puppet",
    162                 "pxcms",
    163                 "reindex",
    164                 "roundcube",
    165                 "shopware",
    166                 "silverstripe",
    167                 "sydes",
    168                 "sylius",
    169                 "symfony",
    170                 "typo3",
    171                 "wordpress",
    172                 "yawik",
    173                 "zend",
    174                 "zikula"
    175             ],
    176             "support": {
    177                 "issues": "https://github.com/composer/installers/issues",
    178                 "source": "https://github.com/composer/installers/tree/v1.9.0"
    179             },
    180             "funding": [
    181                 {
    182                     "url": "https://packagist.com",
    183                     "type": "custom"
    184                 },
    185                 {
    186                     "url": "https://tidelift.com/funding/github/packagist/composer/composer",
    187                     "type": "tidelift"
    188                 }
    189             ],
    190             "install-path": "./installers"
    191         }
    192     ],
    193     "dev": false,
    194     "dev-package-names": []
    195 }
     181            {
     182                "url": "https://tidelift.com/funding/github/packagist/composer/composer",
     183                "type": "tidelift"
     184            }
     185        ]
     186    }
     187]
  • woocommerce-admin/trunk/vendor/composer/jetpack_autoload_classmap.php

    r2472837 r2473439  
    88return array(
    99    'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array(
    10         'version' => '2.7.1.0',
     10        'version' => '2.9.1.0',
    1111        'path'    => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php'
    1212    ),
  • woocommerce-admin/trunk/vendor/composer/jetpack_autoload_psr4.php

    r2472837 r2473439  
    1212    ),
    1313    'Automattic\\WooCommerce\\Admin\\' => array(
    14         'version' => '2.0.0.0',
     14        'version' => '2.0.1.0',
    1515        'path'    => array( $baseDir . '/src' )
    1616    ),
    1717    'Automattic\\Jetpack\\Autoloader\\' => array(
    18         'version' => '2.7.1.0',
     18        'version' => '2.9.1.0',
    1919        'path'    => array( $vendorDir . '/automattic/jetpack-autoloader/src' )
    2020    ),
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-autoloader-handler.php

    r2472837 r2473439  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpa537f22e61b714db0c75a63174123add;
     8namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633;
    99
    1010 // phpcs:ignore
     11
     12use Automattic\Jetpack\Autoloader\AutoloadGenerator;
    1113
    1214/**
     
    1416 */
    1517class Autoloader_Handler {
     18
     19    /**
     20     * The PHP_Autoloader instance.
     21     *
     22     * @var PHP_Autoloader
     23     */
     24    private $php_autoloader;
    1625
    1726    /**
     
    3948     * The constructor.
    4049     *
     50     * @param PHP_Autoloader   $php_autoloader The PHP_Autoloader instance.
    4151     * @param Hook_Manager     $hook_manager The Hook_Manager instance.
    4252     * @param Manifest_Reader  $manifest_reader The Manifest_Reader instance.
    4353     * @param Version_Selector $version_selector The Version_Selector instance.
    4454     */
    45     public function __construct( $hook_manager, $manifest_reader, $version_selector ) {
     55    public function __construct( $php_autoloader, $hook_manager, $manifest_reader, $version_selector ) {
     56        $this->php_autoloader   = $php_autoloader;
    4657        $this->hook_manager     = $hook_manager;
    4758        $this->manifest_reader  = $manifest_reader;
     
    5061
    5162    /**
    52      * Creates an autoloader using the given plugins and activates it.
     63     * Checks to see whether or not an autoloader is currently in the process of initializing.
     64     *
     65     * @return bool
     66     */
     67    public function is_initializing() {
     68        // If no version has been set it means that no autoloader has started initializing yet.
     69        global $jetpack_autoloader_latest_version;
     70        if ( ! isset( $jetpack_autoloader_latest_version ) ) {
     71            return false;
     72        }
     73
     74        // When the version is set but the classmap is not it ALWAYS means that this is the
     75        // latest autoloader and is being included by an older one.
     76        global $jetpack_packages_classmap;
     77        if ( empty( $jetpack_packages_classmap ) ) {
     78            return true;
     79        }
     80
     81        // Version 2.4.0 added a new global and altered the reset semantics. We need to check
     82        // the other global as well since it may also point at initialization.
     83        // Note: We don't need to check for the class first because every autoloader that
     84        // will set the latest version global requires this class in the classmap.
     85        $replacing_version = $jetpack_packages_classmap[ AutoloadGenerator::class ]['version'];
     86        if ( $this->version_selector->is_dev_version( $replacing_version ) || version_compare( $replacing_version, '2.4.0.0', '>=' ) ) {
     87            global $jetpack_autoloader_loader;
     88            if ( ! isset( $jetpack_autoloader_loader ) ) {
     89                return true;
     90            }
     91        }
     92
     93        return false;
     94    }
     95
     96    /**
     97     * Activates an autoloader using the given plugins and activates it.
    5398     *
    5499     * @param string[] $plugins The plugins to initialize the autoloader for.
    55100     */
    56     public function create_autoloader( $plugins ) {
     101    public function activate_autoloader( $plugins ) {
    57102        global $jetpack_packages_psr4;
    58103        $jetpack_packages_psr4 = array();
     
    74119        );
    75120
    76         // Activate the autoloader.
    77         Autoloader::activate( $loader );
     121        $this->php_autoloader->register_autoloader( $loader );
     122
     123        // Now that the autoloader is active we can load the filemap.
     124        $loader->load_filemap();
    78125    }
    79126
     
    82129     */
    83130    public function reset_autoloader() {
    84         global $jetpack_autoloader_loader;
     131        $this->php_autoloader->unregister_autoloader();
     132        $this->hook_manager->reset();
     133
     134        // Clear all of the autoloader globals so that older autoloaders don't do anything strange.
    85135        global $jetpack_autoloader_latest_version;
     136        $jetpack_autoloader_latest_version = null;
    86137
    87         $this->hook_manager->reset();
    88         $jetpack_autoloader_loader         = null;
    89         $jetpack_autoloader_latest_version = null;
     138        global $jetpack_packages_classmap;
     139        $jetpack_packages_classmap = array(); // Must be array to avoid exceptions in old autoloaders!
     140
     141        global $jetpack_packages_psr4;
     142        $jetpack_packages_psr4 = array(); // Must be array to avoid exceptions in old autoloaders!
     143
     144        global $jetpack_packages_filemap;
     145        $jetpack_packages_filemap = array(); // Must be array to avoid exceptions in old autoloaders!
    90146    }
    91147}
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-autoloader-locator.php

    r2472837 r2473439  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpa537f22e61b714db0c75a63174123add;
     8namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633;
    99
    1010 // phpcs:ignore
    1111
    12 use \Automattic\Jetpack\Autoloader\AutoloadGenerator;
     12use Automattic\Jetpack\Autoloader\AutoloadGenerator;
    1313
    1414/**
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-autoloader.php

    r2472837 r2473439  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpa537f22e61b714db0c75a63174123add;
     8namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633;
    99
    1010 // phpcs:ignore
     
    3131        // phpcs:disable Generic.Commenting.DocComment.MissingShort
    3232
     33        /** @var Autoloader_Handler $autoloader_handler */
     34        $autoloader_handler = $container->get( Autoloader_Handler::class );
     35
     36        // If the autoloader is already initializing it means that it has included us as the latest.
     37        $was_included_by_autoloader = $autoloader_handler->is_initializing();
     38
    3339        /** @var Plugin_Locator $plugin_locator */
    3440        $plugin_locator = $container->get( Plugin_Locator::class );
     
    4046        $current_plugin = $plugin_locator->find_current_plugin();
    4147
     48        // The active plugins are those that we were able to discover on the site. This list will not
     49        // include mu-plugins, those activated by code, or those who are hidden by filtering. We also
     50        // want to take care to not consider the current plugin unknown if it was included by an
     51        // autoloader. This avoids the case where a plugin will be marked "active" while deactivated
     52        // due to it having the latest autoloader.
     53        $active_plugins = $plugins_handler->get_active_plugins( true, ! $was_included_by_autoloader );
     54
    4255        // The cached plugins are all of those that were active or discovered by the autoloader during a previous request.
    4356        // Note that it's possible this list will include plugins that have since been deactivated, but after a request
     
    4558        $cached_plugins = $plugins_handler->get_cached_plugins();
    4659
    47         // The active plugins are those that we were able to discover in on the site. This list will not include
    48         // mu-plugins, those activated by code, or those who are hidden by filtering.
    49         // By combining these lists we can preemptively load classes for plugins that are activated via another method.
    50         // While this may result in us considering packages in deactivated plugins the request after they're removed,
    51         // there shouldn't be any problems as a result and the eventual consistency is reliable enough.
    52         $all_plugins = array_values( array_unique( array_merge( $plugins_handler->get_active_plugins(), $cached_plugins ) ) );
     60        // We combine the active list and cached list to preemptively load classes for plugins that are
     61        // presently unknown but will be loaded during the request. While this may result in us considering packages in
     62        // deactivated plugins there shouldn't be any problems as a result and the eventual consistency is sufficient.
     63        $all_plugins = array_merge( $active_plugins, $cached_plugins );
     64
     65        // In particular we also include the current plugin to address the case where it is the latest autoloader
     66        // but also unknown (and not cached). We don't want it in the active list because we don't know that it
     67        // is active but we need it in the all plugins list so that it is considered by the autoloader.
     68        $all_plugins[] = $current_plugin;
     69
     70        // We require uniqueness in the array to avoid processing the same plugin more than once.
     71        $all_plugins = array_values( array_unique( $all_plugins ) );
    5372
    5473        /** @var Latest_Autoloader_Guard $guard */
    5574        $guard = $container->get( Latest_Autoloader_Guard::class );
    56         if ( $guard->should_stop_init( $current_plugin, $all_plugins ) ) {
     75        if ( $guard->should_stop_init( $current_plugin, $all_plugins, $was_included_by_autoloader ) ) {
    5776            return;
    5877        }
    5978
    60         /** @var Autoloader_Handler $autoloader_handler */
    61         $autoloader_handler = $container->get( Autoloader_Handler::class );
    62 
    6379        // Initialize the autoloader using the handler now that we're ready.
    64         $autoloader_handler->create_autoloader( $all_plugins );
     80        $autoloader_handler->activate_autoloader( $all_plugins );
    6581
    6682        /** @var Hook_Manager $hook_manager */
     
    7288        $hook_manager->add_action(
    7389            'shutdown',
    74             function () use ( $plugins_handler, $cached_plugins ) {
     90            function () use ( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) {
    7591                // Don't save a broken cache if an error happens during some plugin's initialization.
    7692                if ( ! did_action( 'plugins_loaded' ) ) {
     
    8399                }
    84100
    85                 // Load the active plugins fresh since the list we have above might not contain
     101                // Load the active plugins fresh since the list we pulled earlier might not contain
    86102                // plugins that were activated but did not reset the autoloader. This happens
    87                 // because they were already included in the cache.
    88                 $active_plugins = $plugins_handler->get_active_plugins();
     103                // when a plugin is in the cache but not "active" when the autoloader loads.
     104                // We also want to make sure that plugins which are deactivating are not
     105                // considered "active" so that they will be removed from the cache now.
     106                $active_plugins = $plugins_handler->get_active_plugins( false, ! $was_included_by_autoloader );
    89107
    90108                // The paths should be sorted for easy comparisons with those loaded from the cache.
     
    103121        // phpcs:enable Generic.Commenting.DocComment.MissingShort
    104122    }
    105 
    106     /**
    107      * Loads a class file if one could be found.
    108      *
    109      * @param string $class_name The name of the class to autoload.
    110      *
    111      * @return bool Indicates whether or not a class file was loaded.
    112      */
    113     public static function load_class( $class_name ) {
    114         global $jetpack_autoloader_loader;
    115         if ( ! isset( $jetpack_autoloader_loader ) ) {
    116             return;
    117         }
    118 
    119         $file = $jetpack_autoloader_loader->find_class_file( $class_name );
    120         if ( ! isset( $file ) ) {
    121             return false;
    122         }
    123 
    124         require $file;
    125         return true;
    126     }
    127 
    128     /**
    129      * Activates this autoloader and deactivates any other v2 autoloaders that may be present.
    130      *
    131      * @param Version_Loader $version_loader The version loader for our autoloader.
    132      */
    133     public static function activate( $version_loader ) {
    134         // Set the global autoloader to indicate that we've activated this autoloader.
    135         global $jetpack_autoloader_loader;
    136         $jetpack_autoloader_loader = $version_loader;
    137 
    138         // Remove any v2 autoloader that we've already registered.
    139         $autoload_chain = spl_autoload_functions();
    140         foreach ( $autoload_chain as $autoloader ) {
    141             // Jetpack autoloaders are always strings.
    142             if ( ! is_string( $autoloader ) ) {
    143                 continue;
    144             }
    145 
    146             // We can identify a v2 autoloader using the namespace prefix without the unique suffix.
    147             if ( 'Automattic\\Jetpack\\Autoloader\\jp' === substr( $autoloader, 0, 32 ) ) {
    148                 spl_autoload_unregister( $autoloader );
    149                 continue;
    150             }
    151         }
    152 
    153         // Ensure that the autoloader is first to avoid contention with others.
    154         spl_autoload_register( self::class . '::load_class', true, true );
    155 
    156         // Now that we've activated the autoloader we should load the filemap.
    157         $jetpack_autoloader_loader->load_filemap();
    158     }
    159123}
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-container.php

    r2472837 r2473439  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpa537f22e61b714db0c75a63174123add;
     8namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633;
    99
    1010 // phpcs:ignore
     
    9696        );
    9797
     98        require_once __DIR__ . '/class-php-autoloader.php';
     99        $this->dependencies[ PHP_Autoloader::class ] = new PHP_Autoloader();
     100
    98101        require_once __DIR__ . '/class-manifest-reader.php';
    99102        $this->dependencies[ Manifest_Reader::class ] = new Manifest_Reader(
     
    109112        require_once __DIR__ . '/class-autoloader-handler.php';
    110113        $this->dependencies[ Autoloader_Handler::class ] = new Autoloader_Handler(
     114            $this->get( PHP_Autoloader::class ),
    111115            $this->get( Hook_Manager::class ),
    112116            $this->get( Manifest_Reader::class ),
     
    129133     */
    130134    private function initialize_globals() {
     135        /*
     136         * This global was retired in version 2.9. The value is set to 'false' to maintain
     137         * compatibility with older versions of the autoloader.
     138         */
     139        global $jetpack_autoloader_including_latest;
     140        $jetpack_autoloader_including_latest = false;
     141
    131142        // Not all plugins can be found using the locator. In cases where a plugin loads the autoloader
    132143        // but was not discoverable, we will record them in this array to track them as "active".
     
    135146            $jetpack_autoloader_activating_plugins_paths = array();
    136147        }
    137 
    138         // Since older autoloaders include newer ones, we need to be able to tell the difference between an
    139         // inclusion via autoloader and an inclusion via plugin file. This allows the autoloader to
    140         // perform special tasks for each kind of inclusion.
    141         global $jetpack_autoloader_including_latest;
    142         if ( ! isset( $jetpack_autoloader_including_latest ) ) {
    143             // If the latest version global has been set but the including latest hasn't, it means that an
    144             // older autoloader without support for the global is including us.
    145             global $jetpack_autoloader_latest_version;
    146             $jetpack_autoloader_including_latest = isset( $jetpack_autoloader_latest_version );
    147         }
    148148    }
    149149}
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-hook-manager.php

    r2472837 r2473439  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpa537f22e61b714db0c75a63174123add;
     8namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-latest-autoloader-guard.php

    r2472837 r2473439  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpa537f22e61b714db0c75a63174123add;
     8namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633;
    99
    1010 // phpcs:ignore
     
    5454     * is not it.
    5555     *
    56      * @param string   $current_plugin The current plugin we're checking.
    57      * @param string[] $plugins        The active plugins to check for autoloaders in.
     56     * @param string   $current_plugin             The current plugin we're checking.
     57     * @param string[] $plugins                    The active plugins to check for autoloaders in.
     58     * @param bool     $was_included_by_autoloader Indicates whether or not this autoloader was included by another.
    5859     *
    5960     * @return bool True if we should stop initialization, otherwise false.
    6061     */
    61     public function should_stop_init( $current_plugin, $plugins ) {
    62         global $jetpack_autoloader_including_latest;
     62    public function should_stop_init( $current_plugin, $plugins, $was_included_by_autoloader ) {
    6363        global $jetpack_autoloader_latest_version;
    64 
    65         // When we're being included from an older autoloader we need to
    66         // reset the latest version so that the new autoloader can look
    67         // for the latest autoloader again.
    68         if ( $jetpack_autoloader_including_latest ) {
    69             $jetpack_autoloader_latest_version = null;
    70         }
    7164
    7265        // We need to reset the autoloader when the plugins change because
     
    7669        }
    7770
    78         // Don't bother initializing the autoloader if it already has been.
    79         if ( isset( $jetpack_autoloader_latest_version ) ) {
     71        // When the latest autoloader has already been found we don't need to search for it again.
     72        // We should take care however because this will also trigger if the autoloader has been
     73        // included by an older one.
     74        if ( isset( $jetpack_autoloader_latest_version ) && ! $was_included_by_autoloader ) {
    8075            return true;
    8176        }
     
    8378        $latest_plugin = $this->autoloader_locator->find_latest_autoloader( $plugins, $jetpack_autoloader_latest_version );
    8479        if ( isset( $latest_plugin ) && $latest_plugin !== $current_plugin ) {
    85             $jetpack_autoloader_including_latest = true;
    8680            require $this->autoloader_locator->get_autoloader_path( $latest_plugin );
    87             $jetpack_autoloader_including_latest = false;
    8881            return true;
    8982        }
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-manifest-reader.php

    r2472837 r2473439  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpa537f22e61b714db0c75a63174123add;
     8namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-path-processor.php

    r2472837 r2473439  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpa537f22e61b714db0c75a63174123add;
     8namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633;
    99
    1010 // phpcs:ignore
     
    1818     *
    1919     * @param string $path The path we want to process.
     20     *
    2021     * @return string The tokenized path.
    2122     */
     
    4041     *
    4142     * @param string $tokenized_path The path we want to process.
     43     *
    4244     * @return string The expanded path.
    4345     */
     
    6567     * @param string $file The plugin or theme file to resolve.
    6668     * @param array  $directories_to_check The directories we should check for the file if it isn't an absolute path.
     69     *
    6770     * @return string|false Returns the absolute path to the directory, otherwise false.
    6871     */
     
    123126     *
    124127     * @param string $path The path to check.
     128     *
    125129     * @return bool True if the path is absolute, otherwise false.
    126130     */
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-plugin-locator.php

    r2472837 r2473439  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpa537f22e61b714db0c75a63174123add;
     8namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633;
    99
    1010 // phpcs:ignore
     
    3535     *
    3636     * @return string $path The path to the current plugin.
     37     *
    3738     * @throws \RuntimeException If the current plugin does not have an autoloader.
    3839     */
     
    5960     */
    6061    public function find_using_option( $option_name, $site_option = false ) {
    61         $raw = $site_option ? get_site_option( $option_name, array() ) : get_option( $option_name, array() );
    62         if ( empty( $raw ) ) {
     62        $raw = $site_option ? get_site_option( $option_name ) : get_option( $option_name );
     63        if ( false === $raw ) {
    6364            return array();
    6465        }
     
    6869
    6970    /**
    70      * Checks for plugins that are being activated in this request and returns all that it finds.
     71     * Checks for plugins in the `action` request parameter.
     72     *
     73     * @param string[] $allowed_actions The actions that we're allowed to return plugins for.
    7174     *
    7275     * @return array $plugin_paths The list of absolute paths we've found.
    7376     */
    74     public function find_activating_this_request() {
     77    public function find_using_request_action( $allowed_actions ) {
    7578        // phpcs:disable WordPress.Security.NonceVerification.Recommended
    7679
     
    8689        }
    8790
     91        $action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false;
     92        if ( ! in_array( $action, $allowed_actions, true ) ) {
     93            return array();
     94        }
     95
    8896        $plugin_slugs = array();
    89 
    90         $action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false;
    9197        switch ( $action ) {
    9298            case 'activate':
     99            case 'deactivate':
    93100                if ( empty( $_REQUEST['plugin'] ) ) {
    94101                    break;
     
    99106
    100107            case 'activate-selected':
     108            case 'deactivate-selected':
    101109                if ( empty( $_REQUEST['checked'] ) ) {
    102110                    break;
     
    107115        }
    108116
     117        // phpcs:enable WordPress.Security.NonceVerification.Recommended
    109118        return $this->convert_plugins_to_paths( $plugin_slugs );
    110119    }
     
    120129     */
    121130    private function convert_plugins_to_paths( $plugins ) {
     131        if ( ! is_array( $plugins ) || empty( $plugins ) ) {
     132            return array();
     133        }
     134
    122135        // We're going to look for plugins in the standard directories.
    123136        $path_constants = array( WP_PLUGIN_DIR, WPMU_PLUGIN_DIR );
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-plugins-handler.php

    r2472837 r2473439  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpa537f22e61b714db0c75a63174123add;
     8namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633;
    99
    1010 // phpcs:ignore
     
    4747     * Gets all of the active plugins we can find.
    4848     *
     49     * @param bool $include_deactivating When true, plugins deactivating this request will be considered active.
     50     * @param bool $record_unknown When true, the current plugin will be marked as active and recorded when unknown.
     51     *
    4952     * @return string[]
    5053     */
    51     public function get_active_plugins() {
     54    public function get_active_plugins( $include_deactivating, $record_unknown ) {
    5255        global $jetpack_autoloader_activating_plugins_paths;
    53         global $jetpack_autoloader_including_latest;
    5456
    5557        // We're going to build a unique list of plugins from a few different sources
     
    8284        }
    8385
    84         $plugins = $this->plugin_locator->find_activating_this_request();
     86        // These actions contain plugins that are being activated/deactivated during this request.
     87        $plugins = $this->plugin_locator->find_using_request_action( array( 'activate', 'activate-selected', 'deactivate', 'deactivate-selected' ) );
    8588        foreach ( $plugins as $path ) {
    8689            $active_plugins[ $path ] = $path;
     
    9598        // been changed since it was saved in the global.
    9699        $current_plugin = $this->plugin_locator->find_current_plugin();
    97         if ( ! in_array( $current_plugin, $active_plugins, true ) && ! $jetpack_autoloader_including_latest ) {
     100        if ( $record_unknown && ! in_array( $current_plugin, $active_plugins, true ) ) {
    98101            $active_plugins[ $current_plugin ]             = $current_plugin;
    99102            $jetpack_autoloader_activating_plugins_paths[] = $current_plugin;
     103        }
     104
     105        // When deactivating plugins aren't desired we should entirely remove them from the active list.
     106        if ( ! $include_deactivating ) {
     107            // These actions contain plugins that are being deactivated during this request.
     108            $plugins = $this->plugin_locator->find_using_request_action( array( 'deactivate', 'deactivate-selected' ) );
     109            foreach ( $plugins as $path ) {
     110                unset( $active_plugins[ $path ] );
     111            }
    100112        }
    101113
     
    111123    public function get_cached_plugins() {
    112124        $cached = get_transient( self::TRANSIENT_KEY );
    113         if ( false === $cached ) {
     125        if ( ! is_array( $cached ) || empty( $cached ) ) {
    114126            return array();
    115127        }
     
    143155        global $jetpack_autoloader_cached_plugin_paths;
    144156
    145         // When no autoloader has executed there is nothing to have changed.
    146         if ( ! isset( $jetpack_autoloader_cached_plugin_paths ) ) {
    147             $jetpack_autoloader_cached_plugin_paths = $plugins;
    148             return false;
    149         }
    150 
    151157        if ( $jetpack_autoloader_cached_plugin_paths !== $plugins ) {
    152158            $jetpack_autoloader_cached_plugin_paths = $plugins;
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-version-loader.php

    r2472837 r2473439  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpa537f22e61b714db0c75a63174123add;
     8namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633;
    99
    1010 // phpcs:ignore
  • woocommerce-admin/trunk/vendor/jetpack-autoloader/class-version-selector.php

    r2472837 r2473439  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpa537f22e61b714db0c75a63174123add;
     8namespace Automattic\Jetpack\Autoloader\jp38b3d38eb0faab3eda1eac718e9ae633;
    99
    1010 // phpcs:ignore
     
    3434        }
    3535
    36         if ( $use_dev_versions && $this->is_package_version_dev( $selected_version ) ) {
     36        if ( $use_dev_versions && $this->is_dev_version( $selected_version ) ) {
    3737            return false;
    3838        }
    3939
    40         if ( $this->is_package_version_dev( $compare_version ) ) {
     40        if ( $this->is_dev_version( $compare_version ) ) {
    4141            if ( $use_dev_versions ) {
    4242                return true;
     
    6060     * @return bool True if the version is a dev version, else false.
    6161     */
    62     private function is_package_version_dev( $version ) {
     62    public function is_dev_version( $version ) {
    6363        if ( 'dev-' === substr( $version, 0, 4 ) || '9999999-dev' === $version ) {
    6464            return true;
  • woocommerce-admin/trunk/woocommerce-admin.php

    r2472837 r2473439  
    88 * Text Domain: woocommerce-admin
    99 * Domain Path: /languages
    10  * Version: 2.0.0
     10 * Version: 2.0.1
    1111 * Requires at least: 5.3
    1212 * Requires PHP: 5.6.20
Note: See TracChangeset for help on using the changeset viewer.