Linux 软件免费装
Banner图

B2BM Catalog Access Rules for WooCommerce

开发者 woomanagers
更新时间 2026年11月16日 22:47
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

user role hide products catalog mode b2b product visibility

下载

1.0.0 1.0.1 1.0.2

详情介绍:

B2BM Catalog Access Rules for WooCommerce, by B2B Managers, shows every visitor only the catalog they should see. Hide wholesale items from retail customers, retail bundles from wholesale buyers, or your whole B2B range from guests. WooCommerce gives you one catalog and shows it to everybody. 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 fixes it at the level where WooCommerce decides what to show. You write rules that say hide these products, or these whole categories, from this role, and everything downstream obeys. Hidden items 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 items for the 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. What a rule can hide Who a rule can hide from Where hidden items disappear Hiding a button is not a gate. This plugin blocks the product itself, so a hidden item cannot be reached by guessing its address or bought by pasting a link. Who it is for Wholesale and trade suppliers who must not show trade-only lines to the public. B2B stores serving both businesses and consumers from one catalog. Membership sites where part of the range is a member benefit. Distributors and resellers under agreements that restrict what they may advertise. And any store that has ever unpublished a product just to get it out of sight. Common setups How it works
  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 it hides.
  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, Product Visibility Pro for WooCommerce is available from B2B Managers. It adds: 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.

安装:

  1. Upload the plugin and activate it. WooCommerce must be active.
  2. Go to WooCommerce → Catalog Access and click Add Rule.
  3. Choose who the rule hides from: a user role, guests or everyone.
  4. Select the products or whole categories to hide, and save.
  5. Add further rules as needed. Every matching rule applies together.

屏幕截图:

  • The same category for a logged-in customer, with the Hoodies products visible.
  • The catalog access rules: who each rule hides from and what it hides.
  • Adding a rule: who to hide from, and which products or categories.

升级注意事项:

1.0.2 Important fix: products hidden by a category rule are now also blocked on their direct URL and in the cart. Also rebrands to B2B Managers. Your rules are unchanged. 1.0.1 Maintenance release: corrects the plugin author name. No functional changes. 1.0.0 First public release.

常见问题:

How do I hide products from guests in WooCommerce?

Add a rule, set "Hide from" to Guest (not logged in), and pick the products or categories. Logged-out visitors stop seeing those items anywhere in the catalog, while your logged-in customers carry on as normal.

How do I show different products to different user roles?

Create one rule per role. Each rule hides its own set of items from that role, and rules stack rather than override each other, so a wholesale customer and a retail customer can see two different catalogs in the same store.

Can I hide a whole category at once?

Yes. Choose the category rather than individual products and every product inside it is hidden too, along with the category archive and the category's appearance in widgets, menus and the [product_categories] shortcode.

Are subcategories hidden with the parent category?

Yes. A rule on a parent category also hides its child categories and the products in them, so you do not need to select every subcategory by hand.

What happens when someone opens a hidden product's URL?

They are redirected to the shop page. The same applies to a hidden category archive. The product also cannot be added to the cart by URL, so a shared or guessed ?add-to-cart= link does not work either.

Can I make a trade-only store where the public sees nothing?

Yes. Create a rule for the Guest role and select all of your product categories. Guests then see an empty shop, and customers who log in see the catalog. Remember to add new top-level categories to the rule when you create them.

Can I hide something from everyone?

Yes, choose "Everyone (hide from all visitors)". It is handy for pulling items for a while without changing their status, so the product keeps its URL, reviews and history for when it comes back.

Do the rules apply to search results?

Yes. Hidden products are removed from product search as well as from the shop and category pages, so they cannot be found by searching for their name.

Do related products and shortcodes respect the rules?

Yes. Related products, upsells, cross-sells and product shortcode loops are filtered the same way, so a hidden item cannot reappear as a recommendation on a visible product's page.

Does it work with variable products?

Yes. Rules apply at the product level, so hiding a variable product hides it and all of its variations together.

What happens if two rules cover the same product?

They stack. Each rule hides its items from the role it targets, so overlapping rules simply mean the product is hidden from both roles. There is no priority order to manage.

Can I still see hidden products as the store admin?

In the dashboard, always: the Products screen is never filtered. On the storefront, rules apply to your role like any other, so a rule that hides from Guests does not affect you while you are logged in. Use a private browser window to check what guests see.

Does it hide prices or only products?

It hides the product itself. To keep a product visible and hide only its price or its Add to Cart button, use Hide Price and Add to Cart for WooCommerce from the same range.

Will it slow down my store?

No. There are no extra database tables, no front-end scripts and no background processing. Rule lookups are cached per request, so a shop page showing thirty products reads the rules once rather than thirty times.

Does hiding a product affect SEO or my sitemap?

Hidden products are removed from the storefront and from search on your site. The plugin does not alter XML sitemaps or add noindex tags, so a product hidden only from some visitors can still be listed by search engines.

Is it compatible with HPOS and the block checkout?

Yes. The plugin declares compatibility with WooCommerce High-Performance Order Storage and with the block-based Cart & Checkout.

Is there a Pro version?

Yes. Product Visibility Pro for WooCommerce adds "show only to" rules, several roles or named customers on one rule, a request-access form in place of the price, targeting by product tag and scheduled rules. Everything described on this page is included in the free plugin.

What happens to my rules if I uninstall?

Uninstalling removes the plugin's single stored option, which contains your rules. If Product Visibility Pro or the B2B Managers Suite is installed, the rules are kept because they use them. Your products and categories are untouched and simply become visible to everyone again.

更新日志:

1.0.2 1.0.1 1.0.0