diff --git a/plugins/woocommerce/changelog/42951-update-remove-marketplace-feature-flag-ui b/plugins/woocommerce/changelog/42951-update-remove-marketplace-feature-flag-ui new file mode 100644 index 00000000000..5b9e2a223cf --- /dev/null +++ b/plugins/woocommerce/changelog/42951-update-remove-marketplace-feature-flag-ui @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak +Comment: Removed the UI to disable React marketplace interface. + diff --git a/plugins/woocommerce/src/Internal/Admin/Marketplace.php b/plugins/woocommerce/src/Internal/Admin/Marketplace.php index 91623aaaf69..1b016ddbbee 100644 --- a/plugins/woocommerce/src/Internal/Admin/Marketplace.php +++ b/plugins/woocommerce/src/Internal/Admin/Marketplace.php @@ -6,6 +6,7 @@ namespace Automattic\WooCommerce\Internal\Admin; use Automattic\WooCommerce\Utilities\FeaturesUtil; +use Automattic\WooCommerce\Internal\Features\FeaturesController; /** * Contains backend logic for the Marketplace feature. @@ -18,15 +19,16 @@ class Marketplace { * Class initialization, to be executed when the class is resolved by the container. */ final public function init() { - if ( FeaturesUtil::feature_is_enabled( 'marketplace' ) ) { - add_action( 'admin_menu', array( $this, 'register_pages' ), 70 ); - add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); - - // Add a Woo Marketplace link to the plugin install action links. - add_filter( 'install_plugins_tabs', array( $this, 'add_woo_plugin_install_action_link' ) ); - add_action( 'install_plugins_pre_woo', array( $this, 'maybe_open_woo_tab' ) ); - add_action( 'admin_print_styles-plugin-install.php', array( $this, 'add_plugins_page_styles' ) ); + if ( false === FeaturesUtil::feature_is_enabled( 'marketplace' ) ) { + FeaturesController::change_feature_enable( 'marketplace', true ); } + + add_action( 'admin_menu', array( $this, 'register_pages' ), 70 ); + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); + // Add a Woo Marketplace link to the plugin install action links. + add_filter( 'install_plugins_tabs', array( $this, 'add_woo_plugin_install_action_link' ) ); + add_action( 'install_plugins_pre_woo', array( $this, 'maybe_open_woo_tab' ) ); + add_action( 'admin_print_styles-plugin-install.php', array( $this, 'add_plugins_page_styles' ) ); } /** diff --git a/plugins/woocommerce/src/Internal/Features/FeaturesController.php b/plugins/woocommerce/src/Internal/Features/FeaturesController.php index b686e19154d..1a6a6e82ae2 100644 --- a/plugins/woocommerce/src/Internal/Features/FeaturesController.php +++ b/plugins/woocommerce/src/Internal/Features/FeaturesController.php @@ -209,7 +209,7 @@ class FeaturesController { ), 'is_experimental' => false, 'enabled_by_default' => true, - 'disable_ui' => false, + 'disable_ui' => true, 'is_legacy' => true, ), // Marked as a legacy feature to avoid compatibility checks, which aren't really relevant to this feature.