Why sold-out variants stay on the product page
A variant is one buyable combination of a product's options, such as Medium / Red. When it sells out, Shopify marks it unavailable but keeps it on the product, and the theme decides how to show it. Dawn and most other current themes cross the option out or grey it out, and some add "Sold out" in the dropdown. None of them has a setting to remove it.
With a few options that's fine. With 8 sizes and 6 colors, shoppers click through options they can't buy, and a shopper who filters a collection by size can land on a product where that size is gone.
Your options at a glance
| Option | What it does | The catch |
|---|---|---|
| Keep the theme's default | Shows sold-out options crossed out or greyed out | Shoppers still see, and sometimes select, options they can't buy |
| Theme code | Hides sold-out options on the product page with JavaScript | Product page only, it can flash while the page loads, and a theme update or a new theme undoes it |
| Delete the variant | Removes it everywhere | You rebuild it at every restock, and links, ads and carts that point to it stop working |
| An app such as VarHide | Unpublishes sold-out variants from the sales channels you choose and publishes them again on restock | Needs an app; automatic updates are on the Premium plan |
Why theme code is a short-term fix
Search the Shopify Community for "hide sold out variants" and you'll find a snippet for almost every theme, and Shopify's own Help Center tutorial is filed under vintage themes. The snippets work the same way: the page loads with every option, then a script hides the sold-out ones in the shopper's browser. That has three limits:
- Only the product page changes. Quick views, collection filters and search still show the variant.
- Combinations are hard. On a product with sizes and colors, hiding "Medium" because Medium / Red sold out also hides Medium / Blue, unless the code checks every combination.
- It doesn't survive updates. A theme update replaces the files you edited, and a new theme needs the code again.
Hiding a variant at the sales channel level
Since May 2026, Shopify lets each variant be published or unpublished on its own, per sales channel or catalog. An unpublished variant isn't visible to buyers on that channel, while the rest of the product stays live. Nothing is deleted: the variant keeps its inventory, SKU and order history.
What Shopify doesn't do is connect this to stock. A variant that sells out stays published, and a variant you unpublished stays hidden after a restock until someone publishes it again. That's the part an app automates.
How to hide sold-out variants automatically with VarHide
VarHide unpublishes sold-out variants from the sales channels you choose and publishes them again when they're back in stock.
- Install VarHide from the Shopify App Store and click Settings on its Home page.
- Under Publications, choose the sales channels to hide variants on, such as Online Store. The Business and Enterprise plans add B2B and market catalogs.
- If you chose Online Store and see App not active in your theme, click Activate in theme and save in the theme editor. The app embed is a switch, not code: it removes option values that no longer have a published variant.
- Under Sold-out definition, choose when a variant counts as sold out: when it's unavailable for sale (the default), when it's unavailable at the locations that fulfill online orders or at locations you pick, or when the total stock across chosen locations falls to a number you set.
- Under Update frequency, choose Manual to update when you click Manually run update on the Home page (free), or Automatic real-time to update as inventory changes (Premium plan).
- Turn on Hide / Publish automation and save.
A few settings are worth knowing:
- Continue selling. Variants set to keep selling when out of stock are left alone by default, so pre-order variants stay visible.
- Fully sold-out products. If every variant of a product sells out, the product page stays live by default, so shoppers can still find it and sign up for a restock alert. Turn off Keep products visible when all variants are sold out to hide them all anyway.
- Variants you hid yourself. Under Publish behavior, Only publish variants hidden by this app keeps variants you unpublished on purpose hidden after a restock.
- Undo. Restore variants to original state on the Home page puts every variant the app changed back on the channels it was on.
Automatic updates can take a couple of minutes to reach the storefront.
When not to hide a variant
Hiding suits sizes and colors that won't be back soon. If a variant returns next week, shoppers may rather see it marked sold out, with a restock date or a back-in-stock signup, than wonder where it went.
