Skip to content

Commit

Permalink
Merge branch 'master' into tweak/remove-lys-feature-flag-override
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasfoo authored Sep 25, 2024
2 parents a349b67 + 7d0e90f commit 5968935
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 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: 0 additions & 1 deletion includes/class-wc-calypso-bridge-themes-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public function set_theme_default_values() {
set_theme_mod( 'sp_homepage_top_rated', false ); // Removes Top Rated Products area from starter content.
set_theme_mod( 'sp_homepage_on_sale', false ); // Removes On Sale Products area from starter content.
set_theme_mod( 'sp_homepage_best_sellers', false ); // Removes Best Sellers Products area from starter content.
update_option( 'woocommerce_demo_store', 'yes' ); // enables demo store notice.
// Force Fresh Site.
update_option( 'fresh_site', true );
// Save option that says the setup has been run already.
Expand Down
2 changes: 2 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ 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 launch-your-store feature flag override #1521
* Remove LYS badge from WPCOM sites #1519
* Remove setting demo store option on ecommerce sites by default #1518

= 2.6.0 =
* Hide WPCOM's coming soon page when the launch-your-store feature flag is enabled #1500
Expand Down

0 comments on commit 5968935

Please sign in to comment.