Hide Products by User Role for WooCommerce
Hide Products by User Role for WooCommerce gives store owners complete control over product visibility based on WordPress user roles — including guests (unauthenticated visitors). Set global rules from the WooCommerce settings screen, or configure visibility per product and per variation, 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 so hidden products never leak through search, archives, the REST API, or direct URL access.
Why store owners choose this plugin
- Run B2B and B2C from a single store — keep wholesale and retail catalogs side by side and show each audience only what they should see
- Protect member-only or exclusive products — restrict visibility to subscribers, members, or any custom role
- Increase catalog relevance — show each user role a curated product set and reduce catalog noise
- Block guest browsing — require an account before any product is visible, turning your shop into a private catalog
- Zero performance overhead — visibility is enforced at the WordPress/WooCommerce query level, not as post-load filtering
Key Features
Global visibility rules (WooCommerce > Settings > Products > Hide by User Roles)
- Hide all products from a role with a single rule
- Hide products by category or tag per role
- Unlimited rules with drag-and-drop priority ordering
- Duplicate existing rules to create variations quickly
- Rule-count badge in the WooCommerce settings navigation
Per-product and per-variation control
- Dedicated "Hide by Role" tab on every WooCommerce product edit screen
- Select any combination of roles to hide that individual product from
- Full support for variable products: set visibility separately on each variation
Complete query coverage — hidden means truly hidden
- Shop page, category archives, and tag archives
- WordPress and WooCommerce search results
- FiboSearch (DGWT WooCommerce Ajax Search) compatibility
- WooCommerce REST API (with block-editor edit-context exemption so admins can still select products)
- Single product page redirect — guests are sent to the login page; logged-in restricted users are sent to the shop
- Block themes — replaces the "No products found" block with a role-aware login or logout prompt
Developer-friendly extensibility
- 20+ filters and actions covering every stage of the visibility pipeline
- Inject runtime rules (subscription-based, time-limited) without touching plugin files
- Add custom taxonomy targets, override redirect URLs, or map membership levels to roles
- HPOS (High Performance Order Storage) compatible
Perfect for
- Wholesale / B2B stores — hide retail products from registered wholesalers, or hide wholesale products from regular customers
- Membership and subscription sites — restrict premium products to paying members
- Private catalogs — require an account before any product is shown
- Tiered product access — show different product sets to different customer segments
