← All Articles
ecommerce

How to Hide Shopify Products From Specific Customer Groups

Restrict visibility by customer tag, not just by app or by Plus-only B2B catalogs.

01There Is No Native Setting for This

Shopify doesn't have a built-in option to restrict a product to specific customers or customer tags. You can unpublish a product from a sales channel entirely, or set it to draft, but neither of those lets you show a product to your wholesale accounts while hiding it from everyone else. That gap is why this ends up as a development request instead of a five-minute admin setting.

The native B2B features Shopify Plus offers solve a version of this for full wholesale catalogs, but they assume you're running a dedicated B2B storefront. If you just need to restrict a handful of products, a limited internal catalog, early-access items, or accounts-only pricing, without rebuilding your store around B2B, this is the smaller, more targeted build.

02The Building Block: Customer Tags in Liquid

Shopify's customer object exposes a tags property in Liquid, an array of every tag applied to the signed-in customer's account. Tag a customer "wholesale" or "vip" in the admin, and that tag is available to check against in your theme code the moment they're logged in.

A basic check looks like this in concept: if the current customer is logged in and their tags include the required tag for a given product, show the product normally. Otherwise, don't. The same logic can run against a product-level tag or metafield that marks which products are restricted, so you're matching a customer tag against a product tag rather than hardcoding product handles into your theme.

One detail worth getting right: since customer.tags is an array, matching should check for an exact tag value, not a loose text match. Use precise, consistent tag names, like "wholesale-tier-2" rather than variations of the same idea, so your conditional logic isn't guessing at intent.

03Step 1: Decide How You're Flagging Restricted Products

Two workable approaches:

  • A product tag (e.g. "restricted-wholesale") that your theme checks against the customer's tags.
  • A metafield on the product that stores which customer tag is required to view it, which is more flexible if different products need different access tiers.

A metafield is the better long-term choice if you expect more than one or two access tiers, since it keeps the mapping explicit and editable from the product admin instead of relying on tag-naming conventions to stay consistent.

04Step 2: Handle the Product Page

This is the easy part and the one most tutorials stop at: wrap the product page content in a conditional that checks whether the logged-in customer's tags satisfy the product's restriction, and show an access-restricted message or a redirect if they don't.

05Step 3: Handle Collections, Search, and Everywhere Else

This is the part that actually makes the restriction work. A restricted product is still a normal product in Shopify's data model, which means it still shows up in collection grids, search results, related-product blocks, and sometimes sitemap and cart upsells, unless every one of those surfaces is checked.

Collection pages loop over every product in the collection to render product cards. That loop needs the same tag check as the product page: skip rendering the card entirely if the current customer doesn't have the required tag. The same logic has to be applied anywhere else your theme lists products automatically, search results, "you may also like" blocks, and any custom product-grid sections.

Skipping this step is the most common reason a "restricted" product isn't actually restricted: the product page is locked down, but the product's name, image, and price are still visible in a collection grid to anyone browsing the store.

06Step 4: Decide What "Restricted" Should Look Like

For a logged-out visitor or a customer without the right tag, you have a few reasonable options: hide the product entirely from grids and treat direct product-page visits as a 404, show it with a "log in to see pricing" message, or redirect to a login page with a note about the account type required. Which one is right depends on whether you want the restriction to be invisible (the product simply doesn't exist for that visitor) or visible as an incentive to apply for account access.

07When This Is Worth Building vs. When to Use an App

If you only need this for a short-term test, or you're comfortable with a third-party app managing the tagging and visibility rules end to end, an access-control app is a reasonable starting point. If this is a permanent part of how your store operates, wholesale accounts, an internal-only catalog, tiered access by account type, a custom build tends to hold up better, since the logic lives in your own theme and isn't dependent on an app's continued support, and there's no recurring fee for something that's a bounded, one-time piece of development work.

08Conclusion

Hiding a product from specific customers isn't a single setting in Shopify; it's a customer tag, a way to flag which products are restricted, and a conditional check applied consistently everywhere a product can appear, not just its own page. Get the product page right and stop there, and the product will still leak through collections and search. Handle every surface, and the restriction actually works.

Frequently Asked Questions

Does Shopify have a built-in way to hide products from specific customers?+

How do customer tags work for this?+

Will this also work with Shopify's B2B features?+

Why is my restricted product still showing up in collections?+

How long does a build like this take?+

From Me

Want This Handled Across Your Whole Theme?

The tricky part of this build isn't the product page, it's every other place a hidden product can leak through: collections, search, recommendations, and cart. If you want it handled correctly across your whole theme, that's what our Shopify development team is for.

Leave a Comment

Ask a Question or Leave a Comment