From 212ee1e8c236b03a3846725fa9e0a6d0b4910fc4 Mon Sep 17 00:00:00 2001 From: Ilyas Foo Date: Tue, 24 Sep 2024 17:48:56 +0800 Subject: [PATCH 1/3] Apply badge removal to all of wpcom --- includes/class-wc-calypso-bridge-coming-soon.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/includes/class-wc-calypso-bridge-coming-soon.php b/includes/class-wc-calypso-bridge-coming-soon.php index 56c2cacf..29ec3f11 100644 --- a/includes/class-wc-calypso-bridge-coming-soon.php +++ b/includes/class-wc-calypso-bridge-coming-soon.php @@ -40,7 +40,7 @@ public function __construct() { add_filter( 'pre_option_woocommerce_coming_soon', array( $this, 'override_option_woocommerce_coming_soon' ) ); add_filter( 'pre_update_option_woocommerce_coming_soon', array( $this, 'override_update_woocommerce_coming_soon' ), 10, 2 ); // Admin bar menu is not only shown in the admin area but also in the front end when the admin user is logged in. - add_action( 'admin_bar_menu', array( $this, 'possibly_remove_site_visibility_badge' ), 32 ); + add_action( 'admin_bar_menu', array( $this, 'remove_site_visibility_badge' ), 32 ); if ( is_admin() ) { add_filter( 'plugins_loaded', array( $this, 'maybe_add_admin_notice' ) ); @@ -208,9 +208,8 @@ function () use ( $message, $notice_type ) { * @param WP_Admin_Bar $wp_admin_bar The admin bar instance. * @return void */ - public function possibly_remove_site_visibility_badge( $wp_admin_bar ) { - // TODO: Remove feature check once the site visibility badge is behind feature flag in core. - if ( wc_calypso_bridge_is_trial_plan() || ! $this->is_feature_enabled() ) { + public function remove_site_visibility_badge( $wp_admin_bar ) { + if ( $wp_admin_bar && $this->is_feature_enabled() ) { $wp_admin_bar->remove_node( 'woocommerce-site-visibility-badge' ); } } From fa233997d1e19c9d6234fdcad46f301a7ad2caa8 Mon Sep 17 00:00:00 2001 From: Ilyas Foo Date: Tue, 24 Sep 2024 18:01:33 +0800 Subject: [PATCH 2/3] Changelog and update version to x.x.x --- includes/class-wc-calypso-bridge-coming-soon.php | 2 +- readme.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/class-wc-calypso-bridge-coming-soon.php b/includes/class-wc-calypso-bridge-coming-soon.php index 29ec3f11..2fe951ce 100644 --- a/includes/class-wc-calypso-bridge-coming-soon.php +++ b/includes/class-wc-calypso-bridge-coming-soon.php @@ -6,7 +6,7 @@ * Class WC_Calypso_Bridge_Coming_Soon * * @since 2.6.0 - * @version 2.6.0 + * @version x.x.x * * Handle Coming Soon mode. */ diff --git a/readme.txt b/readme.txt index 0752bcb6..781ffb5d 100644 --- a/readme.txt +++ b/readme.txt @@ -25,6 +25,7 @@ This section describes how to install the plugin and get it working. = Unreleased = * Re-enable Site visibility settings tab for free trial plans #1512 * Fix LYS badge override #1517 +* Remove LYS badge from WPCOM sites #1519 = 2.6.0 = * Hide WPCOM's coming soon page when the launch-your-store feature flag is enabled #1500 From 8c858e2accb12a64a078b853dbc8d6ff57ee57f5 Mon Sep 17 00:00:00 2001 From: Ilyas Foo Date: Wed, 25 Sep 2024 09:13:54 +0800 Subject: [PATCH 3/3] Update readme.txt --- readme.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/readme.txt b/readme.txt index 781ffb5d..af15e418 100644 --- a/readme.txt +++ b/readme.txt @@ -24,7 +24,6 @@ This section describes how to install the plugin and get it working. = Unreleased = * Re-enable Site visibility settings tab for free trial plans #1512 -* Fix LYS badge override #1517 * Remove LYS badge from WPCOM sites #1519 = 2.6.0 =