跳到内容

Catalog Access Rules for WooCommerce by B2B Managers

v1.0.3

B2B Managers · 2026年9月23日 上架

Hide products and hide categories by user role in WooCommerce. Product visibility rules for B2B, wholesale, trade-only and members-only catalogs.

正在使用
10 以下
评分
暂无
累计下载
329
最近更新
2026年11月24日
需要 WordPress 5.6+已测试到 7.1.5PHP 7.4+

贡献者

截图

A guest's view of a category: the hidden Hoodies subcategory and its products are not listed.
A guest's view of a category: the hidden Hoodies subcategory and its products are not listed.
The same category for a logged-in customer, with the Hoodies products visible.
The same category for a logged-in customer, with the Hoodies products visible.
The catalog access rules: who each rule hides from and which products or categories it hides.
The catalog access rules: who each rule hides from and which products or categories it hides.
Adding a rule: the user role to hide from, and the products or categories to hide.
Adding a rule: the user role to hide from, and the products or categories to hide.

Hide products and hide categories by user role in WooCommerce. Catalog Access Rules for WooCommerce, by B2B Managers, gives you product visibility rules, so guests, retail customers and wholesale customers each see only the catalog meant for them.

WooCommerce gives you one catalog and shows it to everybody. Its built-in catalog visibility setting can only hide a product from the shop or from search for all visitors at once; it cannot hide products by user role. That is fine for a shop with one kind of customer, and wrong the moment you have two. Trade-only lines end up visible to the public, retail multipacks clutter the wholesale browse, and the distributor range you are not allowed to advertise sits in plain view. The usual workarounds, such as unpublishing products, running a second site or hiding things behind a password, cost you either sales or a second store to maintain.

This plugin controls product visibility at the level where WooCommerce decides what to show. You write rules that say hide these products, or hide these categories, from this user role, and everything downstream obeys. Hidden products vanish from the shop page, category archives and product search. Their direct URLs redirect to the shop. Add-to-cart is refused even if somebody builds an ?add-to-cart= link by hand. Hidden categories disappear from category widgets, menus and the [product_categories] shortcode, so nothing points at a door that will not open.

Rules stack rather than compete. Each rule adds its hidden products for the user role it targets, so a wholesale customer and a guest can have completely different views of the same store without you working out which rule wins. There is also an “Everyone” target for pulling an item from the whole storefront for a while, which is useful when a line is out of stock indefinitely and you do not want to change its status and lose its URL.

Hide products and hide categories

  • Hide specific products, chosen with a product search
  • Hide whole categories, including every product inside them
  • Hide subcategories too: a rule on a parent category also covers its child categories

Product visibility by user role

  • Hide products from guests (visitors who are not logged in)
  • Hide products from any one user role: Customer, Subscriber, Wholesale Customer or a custom trade role
  • Hide products from everyone, to take an item off the storefront without unpublishing it

Where hidden products and categories disappear

  • The shop page, category and tag archives
  • Product search results
  • Related products, upsells, cross-sells and product shortcodes
  • Category lists, widgets, menus and the [product_categories] shortcode
  • Direct product and category URLs, which redirect to the shop
  • The cart: a hidden product cannot be added, even with a direct link

Hiding a button is not a gate. This plugin blocks the product itself, so a hidden product cannot be reached by guessing its address or bought by pasting a link.

Catalog visibility, not catalog mode

A catalog mode plugin keeps every product on show and removes the price or the Add to Cart button. This plugin does the opposite job: it decides which products and categories each visitor can see at all. Use it when the catalog itself must be private, such as a wholesale catalog, a trade-only range or a members-only category. If you want products to stay visible with the price hidden, pair it with Hide Price and Add to Cart for WooCommerce.

Who it is for

  • Wholesale and trade suppliers who must hide wholesale products from the public
  • B2B stores serving both businesses and consumers from one catalog
  • Membership sites where part of the range is a members-only benefit
  • Distributors and resellers under agreements that restrict what they may advertise
  • Any store that has ever unpublished a product just to get it out of sight

Common product visibility setups

  • Trade-only range: hide your wholesale categories from guests and from the Customer role, so only trade accounts see them.
  • Retail-only items: hide gift sets and single units from the Wholesale Customer role, so trade buyers browse a clean bulk catalog.
  • Members-only products: hide a category from guests so it appears after login.
  • Private store: hide every category from guests, so the public sees an empty shop and logged-in customers see the catalog.
  • Temporary withdrawal: hide a product from everyone while it is unavailable, and keep its URL, reviews and history for when it returns.

How to hide products by user role

  1. Go to WooCommerce Catalog Access Add Rule.
  2. Choose who the rule hides from: a user role, guests or everyone.
  3. Pick the products or categories to hide.
  4. Save. The rule takes effect immediately, everywhere the catalog is shown.

Built to stay out of the way

No database tables are added and no front-end scripts or styles are loaded. Rules are applied through WooCommerce’s own visibility and query filters, and rule lookups are cached per request, so a page full of products does not re-read the rules for each one. Uninstalling removes the single option it stores and leaves your products exactly as they were.

The plugin is compatible with WooCommerce High-Performance Order Storage (HPOS) and the block-based Cart & Checkout.

Free and Pro

Everything described above is free and unlimited. There is no cap on rules, products or categories.

For stores that need finer control over product visibility, Product Visibility Pro for WooCommerce is available from B2B Managers. It adds:

  • “Show only to” rules, so a range is visible to chosen people and private for everyone else
  • Several user roles on one rule, and rules for individual named customers
  • Soft mode: keep the product listed and replace the price and button with a request-access form
  • Access requests stored in the dashboard and emailed to you
  • Targeting by product tag
  • Scheduled rules with start and end dates

Pro reads the same rules, so nothing needs to be set up again when you upgrade. The free plugin works on its own and does not require Pro.

Part of the B2B Managers range

This plugin is part of a free range of B2B and wholesale tools for WooCommerce by B2B Managers. Each plugin works on its own and they work well together:

Documentation and support

Documentation, setup guides and the full B2B Managers extension catalogue are on b2bmanagers.com. For questions about this plugin, visit the plugin page or use the wordpress.org support forum.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums