Hide Products by User Role for WooCommerce is plugin that gives store owners complete control over product visibility based on WordPress user roles, including guests (unauthenticated visitors).
You can create global rules or configure visibility for individual products and product variations, all without writing a line of code.
Whether you run a B2B wholesale store, a membership site, or simply want to keep certain products away from guests, this plugin enforces visibility at the query level.
Hidden products never leak through search, archives, the REST API, or direct URL access.
Why store owners choose this plugin
Your store serves different customers. Your catalog shouldn’t look the same to all of them.
Running a wholesale store alongside a retail shop? Restricting premium products to paying members? Keeping your full catalog private until visitors log in?
WooCommerce doesn’t handle this out of the box — and most workarounds leave gaps. Products still show up in search results. The REST API leaks them. Customers can reach hidden pages through a direct link.
Hide Products by User Role closes every gap.
This plugin could be used for:
- Run B2C and B2B businesses from the same store by displaying different catalogs to different audiences.
- Protect member-only or exclusive products by restricting visibility to subscribers, members, administrators, or any custom user role.
- Reduce catalog clutter by showing each user role only the products relevant to them.
- Block guest browsing by requiring users to log in before viewing any products, effectively turning your store into a private catalog.
- Create tiered product access by displaying different products to different customer segments.
How it works
The plugin supports three types of visibility rules:
- Global rules
- Single product rules
- Product variation rules
Global visibility rules
Navigate to WooCommerce > Settings > Products > Hide by User Roles.
Then click Add rule button.

With global rules, you can:
- Hide all products from a specific user role with a single rule.
- Hide products by category for specific user roles.
- Hide products by tag for specific user roles.
- Set the priority order of your rules.
- Duplicate existing rules to create new ones more quickly.
Hide all products from a role

Select the desired User Role and choose All Products as the target.
If you want to hide all products from multiple user roles, simply create an additional rule for each role.
Hide products by category per role

Select the desired User Role, choose Product Category as the target, and select the categories whose products should be hidden.
If you need to apply the same restriction to multiple user roles, create one rule per role.
Hide products by tag per role

Select the desired User Role, choose Product Tag as the target, and select the tags whose products should be hidden.
If you need to apply the same restriction to multiple user roles, create one rule per role.
Single product rules
If you need more granular control, you can hide individual products from specific user roles.

To do this:
- Open the product in the WordPress admin
- In Product Data section, open the Hide by Role tab
- Select the user roles you want to restrict.
- Save the product.
That’s it, this product will now be invisible to users with selected user roles across your entire store.
Hide Specific Product Variations from User Role
You can also hide individual variations of variable products.

To do this:
- Edit the product in the WordPress admin.
- Go to the Variations tab.
- Expand the variation you want to modify.
- At the bottom, find Hide this variation for.
- Select the user roles you want to restrict.
- Save changes.
This allows fine-grained control over which variations are visible to different user roles.
What Happens When Products Are Hidden?
When products are hidden from specific user role:
- Restricted products do not appear on shop pages.
- Category and tag archive pages remain protected.
- Hidden products do not appear in search results.
- Guests attempting to access a restricted product directly are redirected to the login page.
- Logged-in users with restricted roles are redirected back to the shop page.
This transforms your WooCommerce store into a fully controlled private catalog while maintaining compatibility with your existing public store.
Complete Query-Level Protection
Hidden products are filtered at the query level, meaning they are completely inaccessible to restricted users.
They will not appear in:
- Shop pages
- Product category archives
- Product tag archives
- WordPress search results
- WooCommerce search results
- The WooCommerce REST API (except when using the block editor in edit context, allowing administrators to continue selecting products)
Developer ready
Over 20 filters and actions cover every stage of the visibility pipeline. Inject runtime rules based on subscription status, override redirect URLs, add custom taxonomy targets, map membership levels to roles, all without patching the plugin.
Hide Products by User Role is designed as a foundation for PRO extensions. Every step in the visibility pipeline is filterable:
riaco_hpburfw_visibility_rules— inject runtime rules (subscription-based, time-limited, capability-based)riaco_hpburfw_rule_applies— add extra conditions on top of the base role matchriaco_hpburfw_is_product_hidden/riaco_hpburfw_is_variation_hidden— override the final hide decisionriaco_hpburfw_targets— register custom taxonomy targets in the settings UIriaco_hpburfw_roles— add membership levels or custom roles to the managed listriaco_hpburfw_redirect_url— send blocked users wherever makes sense for your store
The riaco_hpburfw_loaded action fires after full initialisation and passes the Plugin instance — the clean entry point for any extension plugin.
User reviews
FAQ — Common questions
No. Visibility is enforced at the query level. Hidden products are excluded from WooCommerce search, WordPress search results.
They are redirected. Guests are sent to the WordPress login page with a return URL. Logged-in users who don’t have access are sent to the shop.
Yes. “Guest” is a first-class role in the plugin — you can create global rules and per-product rules that apply specifically to unauthenticated visitors.
Yes. You can hide entire variable products by role, and you can also control visibility at the individual variation level — each variation has its own role checkboxes.
Yes. The plugin declares full HPOS compatibility.
If your membership plugin assigns WordPress user roles, the plugin works immediately. If it uses custom capabilities instead of roles, the riaco_hpburfw_user_roles filter lets you map those to roles at runtime.
Yes, using the riaco_hpburfw_targets filter. See the developer documentation for the full data structure.
Yes. REST API product queries are filtered by the same rules as frontend queries. The edit context is exempted so admins can still select hidden products in the block editor product picker.
Start hiding products in minutes
Free and open source. Install directly from the WordPress.org plugin directory.

