Kestrel WooCommerce guides

Remove the WooCommerce site visibility badge from the admin toolbar

WooCommerce 9.1 added a “coming soon mode” for users building their stores, and the visibility badge recently moved to the WP admin toolbar. While the “mode” might help new users, it can be annoying for folks who already have live sites — so let’s look at how to remove the WooCommerce site visibility badge from your toolbar.

On our site, we see the badge next to our site title, “Kestrel”:

That “live” badge is what we want to get rid of — we know the site is live, and we’re not going to change it to “Coming soon” after it has gone live anyway, so it serves no purpose here.

(Don’t mind our 4 pending updates, okay? We did them after grabbing the screenshots, we promise.)

Remove WooCommerce site visibility badges

The beauty of WordPress is our ability to change it the way we want to, and this feature is no different! We can easily hide it from our toolbar.

If you’ve never added code to your site before, check out our guide to adding custom code to WooCommerce first!

To hide the “live” badge, you can add a bit of CSS to your site’s styles with a new code snippet:

/**
 * Hides the WooCommerce site visibility badge in the WP admin toolbar.
 */
function kwp_hide_wc_site_vis_badge() {
	echo '<style>
		#wpadminbar .quicklinks li#wp-admin-bar-woocommerce-site-visibility-badge a.ab-item { display: none; }
		</style>';
}
add_action( 'admin_print_styles', 'kwp_hide_wc_site_vis_badge' );
add_action( 'wp_print_footer_scripts', 'kwp_hide_wc_site_vis_badge' );

This will ensure the badge is hidden in your admin area, as well as when you’re viewing your site frontend while logged in.

We could also unhook the WooCommerce code that registers this as part of the toolbar, but we decided a simple approach to hide the site visibility badge was fine for us, and more resilient to Woo being deactivated.

Boom 💥 — with this code snippet active, we’re back to the basic WP toolbar, no unnecessary badges.

Are you using the Coming soon mode for any projects? We are keen to understand if folks are using it for new builds!

Ian Misner Avatar

About the author…

Join the Flock

Product updates, sales & coupons, Woo tutorials. Zero spam.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *