1. Home
  2. Knowledge Base
  3. WooCommerce Wholesale Prices Premium
  4. Wholesale Pricing
  5. How to hide prices from guests in WooCommerce Wholesale Prices
  1. Home
  2. Knowledge Base
  3. WooCommerce Wholesale Prices
  4. Wholesale Pricing
  5. How to hide prices from guests in WooCommerce Wholesale Prices

How to hide prices from guests in WooCommerce Wholesale Prices

Want only logged-in customers, such as your wholesalers, to see prices? Turn on Hide Price and Add to Cart button in WooCommerce Wholesale Prices to hide prices and the Add to cart button from anyone who isn’t logged in.

Prerequisites

  • WooCommerce Wholesale Prices installed and active.
  • Version 2.3.0 or later, if you want guests to still see the variation dropdowns on variable products. On earlier versions, enabling this setting removes the whole variation form instead.
  • An administrator account, to access Wholesale → Settings.

Step 1: Hide prices and the Add to cart button

  1. Go to Wholesale → Settings → Wholesale Prices → Price.
  2. Tick Hide Price and Add to Cart button.
  3. Click Save Changes.

Once saved, this hides the price and the Add to cart button from any visitor who isn’t logged in.

Wholesale Prices Price settings page with the Hide Price and Add to Cart button checkbox ticked and the Save Changes button visible
Wholesale → Settings → Wholesale Prices → Price: tick Hide Price and Add to Cart button, then click Save Changes

Step 2 (optional): Change the replacement message

By default, guests see a Login to see prices link to your My Account page in place of the price. You can replace it with your own message.

  1. Go to Wholesale → Settings → Wholesale Prices → Price.
  2. Edit Price and Add to Cart Replacement Message.
  3. Click Save Changes.

For example:

Price and Add to Cart Replacement Message field in the Wholesale Prices Price settings with a custom message entered
Wholesale → Settings → Wholesale Prices → Price: Price and Add to Cart Replacement Message field
Single product page showing the custom price and Add to cart replacement message instead of the price
A different example message, shown on the single product page

Watch a short walkthrough of this setting:

What guests see

Shop page and product pages

With the setting enabled, guests see no price or Add to cart button anywhere in your shop:

Variation dropdowns stay visible on variable products

If a product has variations, such as different sizes or colors, WooCommerce Wholesale Prices version 2.3.0 and later keeps the attribute dropdowns visible for guests even while Hide Price and Add to Cart button is enabled. A guest can still choose a size or color to see which combinations are available, but the price, stock details, and Add to cart button for the variation they select stay hidden, the same as on a simple product.

Variable product page viewed as a guest, showing the size dropdown, with no price or Add to cart button
Guest view of a variable product: attribute dropdowns stay visible while the price and Add to cart button remain hidden

Troubleshooting

Guests can’t see the variation dropdowns on a variable product

Confirm WooCommerce Wholesale Prices is updated to version 2.3.0 or later. On earlier versions, enabling Hide Price and Add to Cart button removes the whole variation form for variable products, including the attribute dropdowns.

Prices still show to some guests

First, go to Wholesale → Settings → Wholesale Prices → Price and check that Hide Price and Add to Cart button is still ticked.

Next, clear your site cache and any CDN cache. A caching plugin may serve an older version of your pages to visitors.

If prices still show after that, your theme or another plugin may show the price its own way. See the next section.

The price still shows on a single product page

If prices are hidden on your shop and category pages but a price still shows on a single product page, ask your theme developer to use the standard WooCommerce price output for the price element. You can also add a small snippet that hides the custom price element for logged-out visitors.

This happens when a theme or page builder shows the price with its own element. The Hide Price setting controls the standard WooCommerce price output only, so a custom element is not covered. For developers: the custom element most likely calls wc_price() directly instead of get_price_html().

Frequently asked questions

Does hiding prices for guests work on both the shop page and single product pages?
Yes. With standard WooCommerce themes the setting applies across both views at once, so visitors browsing your catalog and those landing directly on a product detail page see neither the price nor the Add to cart button. If your theme or page builder renders the price with a custom element, see The price still shows on a single product page under Troubleshooting.

Can a guest add a variable product to the cart once they select a variation?
No. The Add to cart button and quantity field stay hidden for the selected variation, the same as for the rest of this feature. Guests need to log in to see pricing and complete a purchase.

Can I replace the hidden price with a custom message instead of leaving a blank space?
Yes. Type your message into the Price and Add to Cart Replacement Message field and click Save Changes. The default is a “Login to see prices” link. The field is a rich-text editor, so your message can include a link, for example to your wholesale registration form.

Can I hide prices from guests for only some products?
The Hide Price and Add to Cart button setting is store-wide. It applies to every product for anyone who is not logged in, so there is no built-in way to hide prices on some products while showing them on others for guests. If you need that level of control, a developer can use the wwp_hide_price_and_add_to_cart_button filter to change whether the setting applies to a visitor. The filter runs before any product loads, so it cannot make exceptions for single products.

Does this feature also hide prices from logged-in retail customers, or only guests?
Only guests. Logged-in customers see prices as usual for their role.

Need help?

If you have a question or run into any issues, we’re here to help.

Was this article helpful?

Related Articles

Complete Your Purchase