Skip to content

Commit

Permalink
Remove LYS badge from WPCOM sites (#1519)
Browse files Browse the repository at this point in the history
* Apply badge removal to all of wpcom

* Changelog and update version to x.x.x

* Update readme.txt
  • Loading branch information
ilyasfoo authored Sep 25, 2024
1 parent ce8e0e2 commit 7d0e90f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 4 additions & 5 deletions includes/class-wc-calypso-bridge-coming-soon.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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' ) );
Expand Down Expand Up @@ -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' );
}
}
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,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
* Remove LYS badge from WPCOM sites #1519
* Remove setting demo store option on ecommerce sites by default #1518

= 2.6.0 =
Expand Down

0 comments on commit 7d0e90f

Please sign in to comment.