Why shops hide prices
Three situations come up again and again in the WooCommerce forums:
- Wholesale. Trade customers get their own prices, and you do not want the public to see them. Guests see "Login for pricing", logged-in trade accounts see prices.
- Made to order. Price depends on quantity, material or delivery. There is no number to show, so the product page needs a "request a quote" button instead of "Add to cart".
- Catalogue mode. You are not selling online at all yet, but you want the catalogue public and enquiries coming in.
In all three, hiding the price is only half the job. If you remove the price and the cart button and give the visitor nothing else, they leave. The useful setup is: hide the price, put a quote button in its place, and make sure the request lands somewhere you will actually see it.
Option 1: the free plugin route
This uses Quotyra Quote Requests, which is free and does both halves: hiding prices by audience, and a quote basket that saves every request under WooCommerce → Quotes rather than only emailing it. It takes about five minutes.
Step 1: install
In your WordPress admin go to Plugins → Add New, search for "Quotyra", install and activate. WooCommerce has to be active first.
Step 2: create the quote basket page
Create a new page called "Request a quote" (or anything you like). Add the shortcode below, or in the block editor add the "Quote basket" block.
[quotyra_quote_basket]
Publish it, then go to WooCommerce → Settings → Quotes and pick that page under "Quote basket page". This is where customers review the items they added and send the request.
Step 3: hide prices
On the same settings tab, under "Hide prices":
- Tick Guests to hide prices and the Add to cart button for anyone who is not logged in.
- Or choose specific Roles, for example Customer, so logged-in retail customers also see no prices while your wholesale role does.
- Set the Replacement text, for example "Login for pricing" or "Price on request". Leave it empty to show nothing where the price was.
Administrators and shop managers always see prices, so you will not lock yourself out while testing.
Step 4: test as a guest
Open a product page in a private browser window. You should see the replacement text instead of the price, no Add to cart button, and an "Add to quote" button. Add two products, open the basket page, send a request. Back in the admin, WooCommerce → Quotes should show it with the items and the customer's details, and you should have an email.
The quote button also appears in shop and category grids for simple products, including grids built with the WooCommerce product blocks. Variable products get the button on the product page once a variation is chosen.
Option 2: code only
If you only need to hide prices and do not need quote requests, you can do it with a short snippet in your child theme's functions.php or a code snippets plugin. This hides prices and makes products non-purchasable for logged-out visitors.
add_filter( 'woocommerce_get_price_html', function ( $price ) {
if ( ! is_user_logged_in() ) {
return '<span class="price-hidden">Login for pricing</span>';
}
return $price;
}, 10 );
add_filter( 'woocommerce_is_purchasable', function ( $purchasable ) {
return is_user_logged_in() ? $purchasable : false;
}, 10 );
Where this falls short, from experience:
- It does not hide the price in the cart, in order emails or in structured data that search engines read. You need more filters for each of those.
- It gives the visitor nothing to do. There is no quote button, no form and no record of who asked.
- Role-based rules, per-category rules and replacement text per product all need more code, and every WooCommerce update is a chance for one of those hooks to change.
For a shop that only needs "logged in users see prices", the snippet is fine. The moment you need enquiries, use a plugin.
Two mistakes to avoid
Hiding prices with CSS. The price is still in the page source, in the feed and in Google's cached copy. Hide it server-side.
Quote requests that only arrive by email. Most free quote plugins add a button and send you an email, and that is all. Emails get buried, two people reply to the same request, and nobody knows which quotes are still open. Pick a plugin that stores each request in the admin with a status, or you will be rebuilding that in a spreadsheet within a month.
Frequently asked
Can I hide prices for just one category?
Not in the free version of Quotyra; the rules are by audience (guests and roles). Per-product and per-category button rules are in Pro.
Will hidden prices hurt SEO?
Google does not require a price to index a product page. If you use product structured data, make sure the price is removed there too, which the plugin route handles and the CSS route does not.
Does this work with the block cart and checkout?
Yes. Quote requests never touch the cart, so it does not matter which cart or checkout you use.