How to Hide Sold-Out Variants on Shopify (Without Coding)

One of the most common questions in the Shopify community is: how do I hide sold-out product variants so customers don’t see unavailable options? By default, Shopify shows all variants with a strikethrough or greyed-out style — but many merchants want to completely remove them from view.

Why Hide Sold-Out Variants?

Showing sold-out variants creates friction. Customers click a colour or size, see it’s unavailable, and often abandon the product page. Hiding unavailable options creates a cleaner experience and can increase conversion rates.

Method 1: Use the Veil App (No Code Required)

The easiest solution is Veil – Hide Sold Out Variants, available in the Shopify App Store. Install it, select which products to apply it to, and it automatically hides any out-of-stock variant options.

  • Works with all popular themes including Dawn, Debut, and Prestige
  • Hides at the option level (colour, size, etc.) not just the variant
  • No theme code changes required

Method 2: Edit Your Theme’s JavaScript

If you’re comfortable with code, you can modify your theme’s product.js or variant-selects.js to check variant.available and hide the swatch or option if false.

if (!variant.available) {
  option.classList.add('hidden');
}

This requires editing your theme files and testing across browsers — always work on a duplicated theme.

Method 3: Use Shopify’s Native Filtering (Online Store 2.0)

For Online Store 2.0 themes, Shopify has built-in variant availability filtering in collection pages. In your theme editor, enable Filter by availability so shoppers can filter out-of-stock products entirely.

Which Method Should You Use?

  • No coding experience → Use Veil
  • Developer on staff → Edit theme JS for full control
  • Collection-level issue → Use OS2.0 native filtering

Hiding sold-out variants is a quick win for any Shopify store. It reduces customer frustration and keeps your product pages looking clean and professional.

Previous Article

Shopify B2B for Industrial and Safety Equipment Wholesale

Next Article

Shopify Contact Form Not Sending Emails — 7 Fixes That Work

Subscribe to our Newsletter

Subscribe to our email newsletter to get the latest posts delivered right to your email.

No spam, ever. Unsubscribe anytime.