Shopify Hide Price Snippet
Hide prices and Add to cart from anyone without the right customer tag, with a request-a-quote link.
Your details
Your snippet file (snippets/hide-price.liquid)
{%- comment -%}
Hide price and Add to cart unless the customer has the tag below. This is a pattern, not a drop-in wrapper:
paste the {% liquid %} check once near the top of your product section, then move your existing price
(and, if hideAddToCart is on, your {% form 'product', product %} add-to-cart block) into
the {% if show_pricing %} branch below.
{%- endcomment -%}
{%- liquid
assign show_pricing = false
if customer and customer.tags contains "wholesale"
assign show_pricing = true
endif
-%}
{%- if show_pricing -%}
{%- comment -%} Your theme's existing price markup goes here, unchanged. For example: {%- endcomment -%}
<div class="price">{{ product.price | money }}</div>
{%- comment -%} Your theme's existing {% form 'product', product %} add-to-cart block goes here, unchanged. {%- endcomment -%}
{%- else -%}
{%- style -%}
.ea-hideprice__msg{font-size:14px;color:#555;margin:0 0 .5rem}
.ea-hideprice__link{display:inline-block;padding:.6em 1.2em;border-radius:6px;background:#111;color:#fff;text-decoration:none;font-size:14px;font-weight:600}
{%- endstyle -%}
<div class="ea-hideprice">
<p class="ea-hideprice__msg">Sign in to see pricing</p>
<a class="ea-hideprice__link" href="/pages/request-a-quote">Request a quote</a>
</div>
{%- endif -%}To install: in Shopify admin go to Online Store → Themes, click … next to your theme → Edit code. Under Snippets choose Add a new snippet, name it as shown above, paste this code and save. This is a pattern to merge into your product template, not a wrapper: move your existing price markup (and add-to-cart form, if you turned that off too) inside the {% if show_pricing %} branch.
Tag approved customers with "wholesale" from Customers in your Shopify admin, or automatically with Shopify Flow.
Live preview
Gated by customer tag
This checks whether a shopper is logged in and their account carries a specific tag (for example wholesale), using customer.tags. If they do, the price and Add to cart button render as normal. If not, both are replaced with your message and a link to a quote request page (or your account login).
Tag your approved wholesale or trade customers from Customers in your Shopify admin, or automatically at account creation through Shopify Flow, and they'll see full pricing everywhere this snippet is used.
Adding it to your theme
- 01
Add the snippet
Online Store → Themes → Edit code → Snippets → Add a new snippet named
hide-price, paste the code. - 02
Wrap your price and cart button
In your product template, wrap the existing price display and add-to-cart form with
{% render 'hide-price', product: product %}in place of showing them directly, following the comment in the generated code for exactly where the check goes.
Questions people ask
Will this also hide the price on collection pages?
This snippet is written for the product page. To hide prices on collection cards too, add the same check inside your product card snippet.
Is this the same as Shopify's B2B feature?
No, Shopify's native B2B (company accounts) is a separate, more complete system for wholesale storefronts on eligible plans. This is a simpler tag-based approach for stores that don't use it.
Can a shopper still add the item to cart through a direct link?
This snippet only changes what's displayed; it doesn't block the /cart/add request itself. For a hard block, you'd also need a Shopify Function or checkout rule, which is beyond a theme snippet.
What do logged-out shoppers see?
Whatever message and link you set, by default "Sign in to see pricing" with a link to your quote request page.
Related tools
Last reviewed 30 September 2026.
