Can I hide the price from logged out visitors?
Some wholesale-only stores wish to display their products to the general public, but only show prices and add to cart buttons to logged in users.
How to enable 'Hide Price Until Login'
There are two ways to hide prices from logged out users: globally and per category.
You can hide prices from logged out users by enabling this option on WooCommerce → Settings → Products → Wholesale.
Once enabled, an 'Alternate content' field will appear underneath which you can use to display a message when prices are hidden.
To hide the price from logged out users for specific product categories only, go to Products → Categories and edit a category.
You will see a 'Hide price until login' setting which has 3 options:
- Use global or parent category setting (the default) - The global setting (described above) will be used.
- Hide prices from logged out users - Logged out users will never see the price of products in this category, regardless of the global setting.
- Show prices to logged out users - Logged out users will always see the price of products in this category, regardless of the global setting.
Use the global 'Alternate content' field to control what appears instead of the price. This will be used for all categories where prices are hidden.
Sub-categories will always use the same setting as their parent category, unless you set the 'Hide price until login' setting for the sub-category.
It is possible for a product to be in multiple categories with different 'Hide until login settings'. If this happens then WooCommerce Wholesale Pro will take the most secure approach and hide the price from logged out users.
Can I show variations to public visitors while the price is hidden?
Unfortunately this isn't possible because the 'Hide Price Until Login' feature hides the entire 'Add to cart' element, which includes the variation dropdowns. In addition, WooCommerce itself is designed to hide variations that don't have a price. Variation dropdowns are only designed to be visible when the variations are purchasable.
Instead, we suggest ticking the 'Used for Variations' box on Edit Product → Product Data → Attributes. This will list the attributes on the single product page so that logged out users can see the attributes which make up the variations for that product, even though the actual variation dropdowns aren't visible.