Hide In-app marketplace feature flag UI (#42951)

* Hide Marketplace feature toggle UI
* Ensure marketplace feature is active in DB on all sites

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Kyle Nel 2023-12-20 12:44:22 +02:00 committed by GitHub
parent 8484520231
commit 58138e0036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 9 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Comment: Removed the UI to disable React marketplace interface.

View File

@ -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' ) );
}
/**

View File

@ -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.