Plugin Updates

This commit is contained in:
Tony Volpe
2024-04-02 20:23:21 +00:00
parent 96800520e8
commit 94170ec2c4
1514 changed files with 133309 additions and 105985 deletions

View File

@@ -37,7 +37,7 @@ final class WooCommerce {
*
* @var string
*/
public $version = '8.6.1';
public $version = '8.7.0';
/**
* WooCommerce Schema version.
@@ -250,6 +250,8 @@ final class WooCommerce {
add_action( 'deactivated_plugin', array( $this, 'deactivated_plugin' ) );
add_action( 'woocommerce_installed', array( $this, 'add_woocommerce_inbox_variant' ) );
add_action( 'woocommerce_updated', array( $this, 'add_woocommerce_inbox_variant' ) );
add_action( 'woocommerce_installed', array( $this, 'add_woocommerce_remote_variant' ) );
add_action( 'woocommerce_updated', array( $this, 'add_woocommerce_remote_variant' ) );
// These classes set up hooks on instantiation.
$container = wc_get_container();
@@ -283,6 +285,9 @@ final class WooCommerce {
* Add woocommerce_inbox_variant for the Remote Inbox Notification.
*
* P2 post can be found at https://wp.me/paJDYF-1uJ.
*
* This will no longer be used. The more flexible add_woocommerce_remote_variant
* below will be used instead.
*/
public function add_woocommerce_inbox_variant() {
$config_name = 'woocommerce_inbox_variant_assignment';
@@ -290,6 +295,18 @@ final class WooCommerce {
update_option( $config_name, wp_rand( 1, 12 ) );
}
}
/**
* Add woocommerce_remote_variant_assignment used to determine cohort
* or group assignment for Remote Spec Engines.
*/
public function add_woocommerce_remote_variant() {
$config_name = 'woocommerce_remote_variant_assignment';
if ( false === get_option( $config_name, false ) ) {
update_option( $config_name, wp_rand( 1, 120 ) );
}
}
/**
* Ensures fatal errors are logged so they can be picked up in the status report.
*
@@ -910,14 +927,15 @@ final class WooCommerce {
/**
* Initialize the customer and cart objects and setup customer saving on shutdown.
*
* Note, wc()->customer is session based. Changes to customer data via this property are not persisted to the database automatically.
*
* @since 3.6.4
* @return void
*/
public function initialize_cart() {
// Cart needs customer info.
if ( is_null( $this->customer ) || ! $this->customer instanceof WC_Customer ) {
$this->customer = new WC_Customer( get_current_user_id(), true );
// Customer should be saved during shutdown.
// Customer session should be saved during shutdown.
add_action( 'shutdown', array( $this->customer, 'save' ), 10 );
}
if ( is_null( $this->cart ) || ! $this->cart instanceof WC_Cart ) {