Skip to content

Commit

Permalink
Remove the MCM feature flag on update to WooCommerce 7.7 (woocommerce…
Browse files Browse the repository at this point in the history
…#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
  • Loading branch information
nima-karimi authored Mar 30, 2023
1 parent be9f09f commit afc2344
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/woocommerce/changelog/feature-remove-mcm-flag-option
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: tweak

Remove the multichannel marketing feature flag from database since it's the default option now.
3 changes: 3 additions & 0 deletions plugins/woocommerce/includes/class-wc-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
),
);

/**
Expand Down
8 changes: 8 additions & 0 deletions plugins/woocommerce/includes/wc-update-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}

0 comments on commit afc2344

Please sign in to comment.