Hide sold-out

Shopify Hide Out-of-Stock Variants

Hiding out-of-stock hides the color entirely. Customer doesn't know it exists. Sometimes that's the goal; usually strikethrough wins.

Last updated: July 30, 2026By

Install FreeAdd as a preferred source on Google

When a color sells out, you have two choices: remove it from the picker so nobody sees it, or keep it visible and mark it unavailable. Hiding feels tidy, but the shopper never learns the option exists. That's right for a discontinued color and usually wrong for a short stockout. Here's how to do each and how to decide.

Theme setting

Start in the theme editor, not the code. Open Online Store → Themes → Customize, go to a product template and click the variant picker block. Look for a setting about unavailable or sold-out variants.

Dawn and most current free themes keep sold-out variants visible and mark them as unavailable, either crossed out on buttons or labelled "Sold out" in a dropdown. Some paid themes add a toggle to hide them completely. If your theme has that toggle, switching it is the whole job. Our variant picker explainer shows where these settings live in the common themes.

Custom JS

If your theme has no toggle, hiding needs a code change. The variant picker gets each variant's availability from the product JSON on the page. A developer can loop through the options and remove, or add a hidden class to, any value where every matching variant is unavailable.

Two cautions. First, with more than one option the logic gets tricky: Red might be sold out in Small but in stock in Large, so you can only hide Red when every size is gone. Second, theme updates can overwrite custom code. Keep the change in a separate snippet and note it somewhere your team will find it.

When to hide

When to strikethrough instead

For a temporary stockout, keep the variant visible and crossed out. The shopper who came for Red learns it exists and can sign up for a restock alert instead of assuming you never made it.

Pair the strikethrough with a "Notify me when available" form from a back-in-stock app. That turns a lost sale into an email address and a likely future order. If the restock date is firm, you can go further and keep taking orders with a clear ship date; see continue selling when out of stock for how that works.

Quick decision table

SituationBest approach
Restock expected within a few weeksShow crossed out + notify-me form
Restock date confirmed with supplierKeep selling as preorder with a ship date
Color discontinued for goodHide, or delete the variant
Seasonal color off-seasonHide until the season returns
Print-on-demand productUsually nothing to hide; POD stock rarely runs out on your side

Collection pages

Hiding variants on the product page doesn't hide sold-out products in collections. For that, use the Shopify Search & Discovery app: add an availability filter so shoppers can show in-stock items only, and set sold-out products to sort to the end of collections. That keeps the first screen full of things people can buy.

Automating seasonal changes

Shopify Flow can run workflows on a schedule and change things like product status, tags or metafields. That works well for whole products: set the summer range to draft on September 1 and back to active in May.

Hiding single variants is harder because Flow can't change how your theme draws the picker. A common pattern is to tag or set a metafield on the variants you want hidden and have the theme skip any variant with that flag. Our Shopify Flow with variants guide has examples of workflows that touch variant data.

Show low stock before it runs out

The best way to handle a sellout is to see it coming. A small "Only 3 left" message on a nearly empty variant sets expectations and can nudge a decision. Our guide on showing inventory per variant covers how to display it without faking urgency.

Frequently asked questions

How to hide out-of-stock Shopify variants?

Check your theme's variant picker settings first; some themes have a toggle to hide sold-out variants. If yours doesn't, a developer can add a small script that removes unavailable values from the picker.

Hide vs strikethrough?

Use strikethrough for temporary stockouts so shoppers know the option exists and can ask for a restock alert. Hide only when the variant is discontinued, seasonal or not sold in that market.

Does hiding affect SEO?

Not in any meaningful way. The product page and its canonical URL stay the same, and only the picker changes.

How to hide for seasonal?

For whole products, use a scheduled Shopify Flow workflow to switch products between active and draft. For single variants, flag them with a tag or metafield and have the theme skip flagged variants.

Hide sold-out on collection page?

Use the Shopify Search & Discovery app to add an availability filter and to sort sold-out products to the end of collections.

Best UX for temporary stockout?

Keep the variant visible but crossed out and add a "Notify me" signup. The shopper opts in and gets an email when it's back.

Does hiding sold-out reduce cart abandonment?

It depends on the shopper. Someone who wants Red rarely buys Blue instead, so hiding Red can just send them elsewhere. A crossed-out option with a restock alert keeps that intent.

Related reading

Sources & further reading

Primary sources referenced in this article. We link to official platform documentation and standards bodies rather than secondary summaries so you can verify claims directly.

Try it free on Shopify

PIMW Product Personalizer's permanent Free plan includes live preview, custom options, and Cart Transform pricing.

Install PIMW Product Personalizer