Black Friday: 20% off PRO Ends in Grab the deal

Running a WooCommerce shop? Your customers log in to see their orders, and the WordPress admin bar has no business on top of your shop. This guide explains when WooCommerce hides it on its own, and how to hide the admin bar for customers in every case.

Don’t have the plugin yet? Download Better Admin Bar for free from WordPress.org.


Doesn’t WooCommerce already hide it?

Mostly, yes. WooCommerce hides the admin bar for users who can’t edit posts and can’t manage the shop, so a plain customer doesn’t see it.

Customers still see the admin bar when:

  • they also have another role, for example from a membership or course plugin, that can edit posts,
  • another plugin or your theme turns the admin bar back on,
  • WooCommerce’s check was turned off with the woocommerce_disable_admin_bar filter.

Hide it by role and you no longer depend on WooCommerce’s check.


Hide the admin bar for customers

  1. Install and activate Better Admin Bar (Plugins → Add New Plugin, search for “Better Admin Bar”).
  2. Go to Settings → Better Admin Bar and open the Admin Bar tab.
  3. Under Remove Admin Bar, tick Customer. Older shops often have customers with the Subscriber role too: tick that one as well.
  4. Click Save Changes.

Leave Shop Manager unticked if your team uses the admin bar to jump to orders and products.


Hide it with code instead

This hides the admin bar for everyone who can’t manage the shop. Add it to your child theme’s functions.php or to a code snippets plugin.

add_filter( 'show_admin_bar', function ( $show ) {
	return current_user_can( 'manage_woocommerce' ) ? $show : false;
}, 20 );

Keep customers out of the dashboard

WooCommerce also sends customers who open /wp-admin/ to their My Account page. With the admin bar gone too, customers stay on your shop.


Still need help?

Browse the other articles or create a support ticket and we'll get back to you.