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:
parent
8484520231
commit
58138e0036
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: tweak
|
||||||
|
Comment: Removed the UI to disable React marketplace interface.
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
namespace Automattic\WooCommerce\Internal\Admin;
|
namespace Automattic\WooCommerce\Internal\Admin;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Utilities\FeaturesUtil;
|
use Automattic\WooCommerce\Utilities\FeaturesUtil;
|
||||||
|
use Automattic\WooCommerce\Internal\Features\FeaturesController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains backend logic for the Marketplace feature.
|
* 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.
|
* Class initialization, to be executed when the class is resolved by the container.
|
||||||
*/
|
*/
|
||||||
final public function init() {
|
final public function init() {
|
||||||
if ( FeaturesUtil::feature_is_enabled( 'marketplace' ) ) {
|
if ( false === FeaturesUtil::feature_is_enabled( 'marketplace' ) ) {
|
||||||
add_action( 'admin_menu', array( $this, 'register_pages' ), 70 );
|
FeaturesController::change_feature_enable( 'marketplace', true );
|
||||||
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' ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -209,7 +209,7 @@ class FeaturesController {
|
||||||
),
|
),
|
||||||
'is_experimental' => false,
|
'is_experimental' => false,
|
||||||
'enabled_by_default' => true,
|
'enabled_by_default' => true,
|
||||||
'disable_ui' => false,
|
'disable_ui' => true,
|
||||||
'is_legacy' => true,
|
'is_legacy' => true,
|
||||||
),
|
),
|
||||||
// Marked as a legacy feature to avoid compatibility checks, which aren't really relevant to this feature.
|
// Marked as a legacy feature to avoid compatibility checks, which aren't really relevant to this feature.
|
||||||
|
|
Loading…
Reference in New Issue