1. Home
  2. Knowledge Base
  3. WooCommerce Wholesale Pro
  4. FAQ

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.

You can do this by enabling the 'Hide Prices Until Login' feature in WooCommerce Wholesale Pro.

For more details, read our full guide about hiding WooCommerce prices until login.

How to enable 'Hide Price Until Login'

There are two ways to hide prices from logged out users: globally and per category.

Global setting

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.

Hide prices until login alternate content

Category option

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.

What exactly will logged out users see?

When Hide Prices Until Login is enabled, logged out users will see the following:

  • The main Shop page, category pages etc. will show the product with no prices, and the add to cart buttons will change to 'Read More' buttons. If you want to change the text of the Read More button then we have provided a code snippet for this.
  • The single product pages will show the Alternate content that you entered in the plugin settings.

FAQ

Can I prevent retail customers from seeing prices or purchasing?

Yes. To do this, you should create your products are usual and add wholesale prices but leave the regular price field blank. That way, guest users and logged in users with a 'Customer' role will see the product without prices or add to cart buttons; while logged in wholesale users will see the correct pricing for their role and add to cart buttons.

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.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.