Hide Prices From Guests in WooCommerce
Hide prices from guests in WooCommerce: login-gated pricing, hiding add to cart, catalogue mode, SEO consequences and how to keep the shop useful for visitors.

Hiding prices is a trade convention with a real justification: published trade rates end up in competitors' spreadsheets and in awkward conversations with retail customers. WooCommerce has no built-in switch for it, and the plugins that add one vary widely in how much of the shop they break.
Hide the price, keep the product
The instinct is to make trade products invisible. Resist it. A product page that shows photographs, specifications, datasheets and stock status — with the price replaced by a login prompt — still earns search traffic, still answers the buyer's technical questions, and still converts once the account is approved. A catalogue hidden behind a login earns nothing and is invisible to search entirely.
What has to change together
Three things must flip on the same condition, or customers find the gap:
- The price output becomes a prompt with a link to log in or register.
- The add-to-cart button is removed, not merely hidden with CSS.
- Structured data for price is omitted so you are not publishing what the page conceals.
```php add_filter( 'woocommerce_get_price_html', function ( $html, $product ) { if ( is_user_logged_in() ) { return $html; } return '<a class="df-login-price" href="' . esc_url( wc_get_page_permalink( 'myaccount' ) ) . '">Log in for pricing</a>'; }, 10, 2 );
add_filter( 'woocommerce_is_purchasable', fn( $purchasable ) => is_user_logged_in() && $purchasable ); ```
Removing the button server-side matters: hiding it in CSS leaves the add-to-cart endpoint reachable, and bots find it.
Make the registration path obvious
The login prompt is where trade visitors decide whether to bother. Say what an account gives them — trade pricing, order history, stock availability — how long approval takes, and who qualifies. A one-line explanation next to the prompt converts noticeably better than a bare "log in to see prices".
Partial gating is usually the right answer
Hiding every price is rarely necessary. Common workable splits:
- Retail range open, trade range gated.
- Prices visible to everyone, trade discounts visible only after login.
- Prices visible, quantity breaks and contract rates gated.
Each keeps the store useful to first-time visitors while protecting the numbers that matter commercially.
Doing it as configuration
Wholesale & Role-Based Pricing can hide prices and the add-to-cart button for guests or for chosen roles, per product or per category, and reveal role-specific prices once an approved account logs in. It pairs naturally with different prices for different users and with role-aware quantity limits.
Check what a logged-out crawler sees
After setup, load a product page in a private window and view the source. If a price still appears in the markup, in a data attribute, or in JSON-LD, the gate is cosmetic. Fixing that is usually the difference between a policy and an actual restriction.
FAQ
- How do I hide prices until a customer logs in?
- Replace the price output with a login prompt for logged-out visitors and remove the add-to-cart button on the same condition, so the two never disagree.
- Should I hide the whole product or just the price?
- Keep the product visible in almost every case. Descriptions, specifications and photographs are what search engines and buyers need; the price is the only part that has to be gated.
- Does hiding prices hurt SEO?
- It removes price-related rich results and can reduce click-through, but the pages still rank on product and specification content. What genuinely harms rankings is hiding the entire catalogue behind a login.
- Can I hide prices only for certain products or categories?
- Yes, and it is often the better compromise: retail lines stay open to everyone while trade-only ranges require an approved account.
- How do customers get access?
- Offer a short trade registration form with manual or automatic approval, and tell visitors on the product page how long approval takes. An unexplained login wall is the main reason trade visitors leave.
This article is part of our WooCommerce pricing topic hub, where the related plugins and guides live together.


