plugin updates

This commit is contained in:
Tony Volpe
2024-07-16 13:57:46 +00:00
parent 41f50eacc4
commit 8f93917880
1529 changed files with 259452 additions and 25451 deletions

View File

@@ -2728,6 +2728,53 @@ function wc_update_891_create_plugin_autoinstall_history_option() {
/**
* Add woocommerce_show_lys_tour.
*/
function wc_update_900_add_launch_your_store_tour_option() {
function wc_update_910_add_launch_your_store_tour_option() {
add_option( 'woocommerce_show_lys_tour', 'yes' );
}
/**
* Remove user meta associated with the keys '_last_order', '_order_count' and '_money_spent'.
*
* New keys are now used for these, to improve compatibility with multisite networks.
*
* @return void
*/
function wc_update_910_remove_obsolete_user_meta() {
global $wpdb;
$deletions = $wpdb->query( "
DELETE FROM $wpdb->usermeta
WHERE meta_key IN (
'_last_order',
'_order_count',
'_money_spent'
)
" );
$logger = wc_get_logger();
if ( null === $logger ) {
return;
}
if ( false === $deletions ) {
$logger->notice(
'During the update to 9.1.0, WooCommerce attempted to remove user meta with the keys "_last_order", "_order_count" and "_money_spent" but was unable to do so.',
array(
'source' => 'wc-updater',
)
);
} else {
$logger->info(
sprintf(
1 === $deletions
? 'During the update to 9.1.0, WooCommerce removed %d user meta row associated with the meta keys "_last_order", "_order_count" or "_money_spent".'
: 'During the update to 9.1.0, WooCommerce removed %d user meta rows associated with the meta keys "_last_order", "_order_count" or "_money_spent".',
number_format_i18n( $deletions )
),
array(
'source' => 'wc-updater',
)
);
}
}