auto-patch 638-dev-dev01-2024-05-14T20_44_36
This commit is contained in:
@@ -10,6 +10,8 @@ defined( 'ABSPATH' ) || exit;
|
||||
|
||||
use Automattic\WooCommerce\Internal\AssignDefaultCategory;
|
||||
use Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController;
|
||||
use Automattic\WooCommerce\Internal\ComingSoon\ComingSoonCacheInvalidator;
|
||||
use Automattic\WooCommerce\Internal\ComingSoon\ComingSoonRequestHandler;
|
||||
use Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController;
|
||||
use Automattic\WooCommerce\Internal\DownloadPermissionsAdjuster;
|
||||
use Automattic\WooCommerce\Internal\Features\FeaturesController;
|
||||
@@ -23,7 +25,9 @@ use Automattic\WooCommerce\Internal\Settings\OptionSanitizer;
|
||||
use Automattic\WooCommerce\Internal\Utilities\WebhookUtil;
|
||||
use Automattic\WooCommerce\Internal\Admin\Marketplace;
|
||||
use Automattic\WooCommerce\Proxies\LegacyProxy;
|
||||
use Automattic\WooCommerce\Utilities\TimeUtil;
|
||||
use Automattic\WooCommerce\Utilities\{ LoggingUtil, TimeUtil };
|
||||
use Automattic\WooCommerce\Admin\WCAdminHelper;
|
||||
use Automattic\WooCommerce\Admin\Features\Features;
|
||||
|
||||
/**
|
||||
* Main WooCommerce Class.
|
||||
@@ -37,7 +41,7 @@ final class WooCommerce {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $version = '8.7.0';
|
||||
public $version = '8.9.0';
|
||||
|
||||
/**
|
||||
* WooCommerce Schema version.
|
||||
@@ -269,6 +273,8 @@ final class WooCommerce {
|
||||
$container->get( WebhookUtil::class );
|
||||
$container->get( Marketplace::class );
|
||||
$container->get( TimeUtil::class );
|
||||
$container->get( ComingSoonCacheInvalidator::class );
|
||||
$container->get( ComingSoonRequestHandler::class );
|
||||
|
||||
/**
|
||||
* These classes have a register method for attaching hooks.
|
||||
@@ -366,10 +372,19 @@ final class WooCommerce {
|
||||
$this->define( 'WC_DISCOUNT_ROUNDING_MODE', 2 );
|
||||
$this->define( 'WC_TAX_ROUNDING_MODE', 'yes' === get_option( 'woocommerce_prices_include_tax', 'no' ) ? 2 : 1 );
|
||||
$this->define( 'WC_DELIMITER', '|' );
|
||||
$this->define( 'WC_LOG_DIR', $upload_dir['basedir'] . '/wc-logs/' );
|
||||
$this->define( 'WC_SESSION_CACHE_GROUP', 'wc_session_id' );
|
||||
$this->define( 'WC_TEMPLATE_DEBUG_MODE', false );
|
||||
|
||||
/**
|
||||
* As of 8.8.0, it is preferable to use the `woocommerce_log_directory` filter hook to change the log
|
||||
* directory. WC_LOG_DIR_CUSTOM is a back-compatibility measure so we can tell if `WC_LOG_DIR` has been
|
||||
* defined outside of WC Core.
|
||||
*/
|
||||
if ( defined( 'WC_LOG_DIR' ) ) {
|
||||
$this->define( 'WC_LOG_DIR_CUSTOM', true );
|
||||
}
|
||||
$this->define( 'WC_LOG_DIR', LoggingUtil::get_log_directory() );
|
||||
|
||||
// These three are kept defined for compatibility, but are no longer used.
|
||||
$this->define( 'WC_NOTICE_MIN_PHP_VERSION', '7.2' );
|
||||
$this->define( 'WC_NOTICE_MIN_WP_VERSION', '5.2' );
|
||||
@@ -386,7 +401,6 @@ final class WooCommerce {
|
||||
* The SSR in the name is preserved for bw compatibility, as this was initially used in System Status Report.
|
||||
*/
|
||||
$this->define( 'WC_SSR_PLUGIN_UPDATE_RELEASE_VERSION_TYPE', 'none' );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -636,6 +650,10 @@ final class WooCommerce {
|
||||
include_once WC_ABSPATH . 'includes/admin/class-wc-admin.php';
|
||||
}
|
||||
|
||||
if ( $this->is_request( 'admin' ) || $this->is_request( 'cron' ) ) {
|
||||
include_once WC_ABSPATH . 'includes/admin/class-wc-admin-marketplace-promotions.php';
|
||||
}
|
||||
|
||||
// We load frontend includes in the post editor, because they may be invoked via pre-loading of blocks.
|
||||
$in_post_editor = doing_action( 'load-post.php' ) || doing_action( 'load-post-new.php' );
|
||||
|
||||
@@ -974,7 +992,7 @@ final class WooCommerce {
|
||||
* @param string $filename The filename of the activated plugin.
|
||||
*/
|
||||
public function activated_plugin( $filename ) {
|
||||
include_once dirname( __FILE__ ) . '/admin/helper/class-wc-helper.php';
|
||||
include_once __DIR__ . '/admin/helper/class-wc-helper.php';
|
||||
|
||||
if ( '/woocommerce.php' === substr( $filename, -16 ) ) {
|
||||
set_transient( 'woocommerce_activated_plugin', $filename );
|
||||
@@ -990,7 +1008,7 @@ final class WooCommerce {
|
||||
* @param string $filename The filename of the deactivated plugin.
|
||||
*/
|
||||
public function deactivated_plugin( $filename ) {
|
||||
include_once dirname( __FILE__ ) . '/admin/helper/class-wc-helper.php';
|
||||
include_once __DIR__ . '/admin/helper/class-wc-helper.php';
|
||||
|
||||
WC_Helper::deactivated_plugin( $filename );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user