Remove the MCM feature flag on update to WooCommerce 7.7 (#37454)

* Remove the MCM feature flag on update to WooCommerce 7.7

This feature flag is no longer needed because the new marketing page will be the default on version 7.7 (pe2C5g-Ft-p2#comment-582).

* Remove the marketing overview welcome option
This commit is contained in:
Nima Karimi 2023-03-30 14:13:57 +01:00 committed by GitHub
parent be9f09f217
commit afc2344f47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: tweak
Remove the multichannel marketing feature flag from database since it's the default option now.

View File

@ -229,6 +229,9 @@ class WC_Install {
'wc_update_750_add_columns_to_order_stats_table',
'wc_update_750_disable_new_product_management_experience',
),
'7.7.0' => array(
'wc_update_770_remove_multichannel_marketing_feature_options',
),
);
/**

View File

@ -2581,3 +2581,11 @@ function wc_update_750_disable_new_product_management_experience() {
update_option( 'woocommerce_new_product_management_enabled', 'no' );
}
}
/**
* Remove the multichannel marketing feature flag and options. This feature is now enabled by default.
*/
function wc_update_770_remove_multichannel_marketing_feature_options() {
delete_option( 'woocommerce_multichannel_marketing_enabled' );
delete_option( 'woocommerce_marketing_overview_welcome_hidden' );
}