Do you need to hide an entire section of your catalog from guests or from specific customer groups?
Then you need an extra layer of visibility control.
In this guide you’ll learn how to hide WooCommerce product categories by user role using the Hide Products by User Role for WooCommerce plugin, without writing a single line of code.
The Plugin You Need
Hide Products by User Role for WooCommerce is a free WordPress plugin that adds global visibility rules at the category level.
I have developed this plugin, so if you have any questions, please, ask.
Hide a Product Category from Guests
Install the plugin
Go to WP Admin → Plugins → Add New, search for Hide Products by User Role for WooCommerce (or use link above to download it), install and activate.
Open the settings
Go to WooCommerce → Settings → Products and click the Hide by Role tab.

Add a rule
Click Add Rule and fill in the three fields:
- Role:
Guest. - Target: product category.
- Terms: select the category you want to hide.
The result should be something like this:

In this example I have hidden Accessories category from Guests, in one click.
Save
Click Save changes.
The category and all products inside it are immediately hidden from unauthenticated visitors.
Hiding a Products from Category from a Logged-In Role
The same process applies to any WordPress role, not just guests.
To hide the Wholesale category from regular customers (subscribers):

- Click Add Rule.
- Set Role to
Subscriber. - Set Target to your category.
- Select the Wholesale category.
- Save.
Subscribers will not see the products from that specific category in the shop, category archives, search results, or the REST API.
Users with the wholesale_customer role (or any role you haven’t restricted) will see it normally.
What “Hidden” Means in Practice
When a product category rule is active:
Direct URL: if a guest navigates directly to a product in a hidden category, they are redirected to login page.
Shop page: products in the hidden category do not appear.
Category archive: the archive renders with no products (or can be redirected with a filter).
Search results: products from the hidden category are excluded.
WooCommerce blocks: the product grid block respects the rule.
REST API: products from the hidden category do not appear in API responses.
Does It Work with Sub-Categories?
This is very important: the rule targets a single term.
Sub-categories must be added as separate rules if you want to hide them too.
Alternatively, you can hide the parent category and also add rules for each sub-category.
Why Hide a Product Category?
Hiding individual products one by one does not scale.
When you have a category with dozens of items like a wholesale range, a professional-grade line, a members-only collection, you want to apply one rule that covers the whole group instantly.
Common scenarios:
- A trade catalog that is separate from the public retail range.
- A premium tier of products visible only to paying members.
- A seasonal collection revealed only to VIP customers before the public launch.
- A discontinued range kept visible only to admin and managers for order reference.
This plugin is huge a time saver.
Get the Plugin
One rule. One click. Every product in a category hidden instantly from the role you choose.
Download Hide Products by User Role for WooCommerce.
