Buy B2BKing
$299 $199
To begin configuring product visibility, the first step is to go to B2BKing->Settings->Access Restriction and choose "Control Visibility" (disable "All products visible"). This allows you to set product visibility by category or by product.
Go to each WooCommerce category and scroll down to the Group Visibility rules:
Check each option according to your needs and save the settings.
You can set visibility not only per category but also for each individual product. To do this, go to the Edit Product page and scroll down to the product visibility settings:
To set visibility for the product individually, change "Follow category rules (Default)" to "Manual Setting". This will allow you to configure visibility settings for each group:
By default, when you first configure visibility, B2BKing will automatically make all categories visible. However, if you add more categories later on, you may need to set this manually.
You can make all categories visible in bulk by going to B2BKing->Tools->Visibility Editor, choosing "All categories visible to ALL," and clicking "Set all categories":
If you go to B2BKing -> Settings -> Other, you will find advanced visibility settings:
Let's see what these do.
First, the "Product Visibility Cache" setting caches a list of which products are visible for each user. This can have a significant effect on maintaining good performance when using visibility. It also helps apply visibility at a deeper level and may help hide products and categories in places where they would otherwise remain visible.
"Hidden Has Priority" modifies how visibility is calculated when a product belongs to multiple categories. By default, products are visible if they belong to at least one visible category. With this setting enabled, however, products will be hidden if they belong to at least one hidden category. Unless this is necessary for your setup, we generally recommend keeping it disabled.
A common issue that occurs when using visibility is that products are hidden but categories are not. Often this can be resolved by enabling the product visibility cache.
However, that does not always work, as it depends on the specific element, menu, or widget that displays categories and how it works.
In cases where that does not work, the issue can usually be resolved by adding group-specific CSS to hide elements. We can assist you with writing the correct CSS via support.
While this feature can hide products and variable products completely, it cannot hide individual variations.
However, what you can do is create a "hidden price" dynamic rule for an individual variation, making it unavailable for purchase and showing a message such as "This product is not available" or "This product is only available for B2B buyers."
The Add to Cart button would then be greyed out, and the customer would not be able to add the product to the cart.
All visibility settings are stored as product or category metadata. Therefore, you can also import visibility settings or modify them programmatically. Here's how it works:
1. Meta keys for a category:
Meta value: the value can be 1 for visible and 0 for invisible.
2. Meta keys for a product:
Meta value: the value can be default (corresponds to "Follow category rules") or manual (corresponds to manual visibility).
3. Meta keys for manual product visibility:
These work the same way as the category metadata described above.
Powered by BetterDocs