KlinKode

How to Hide Out of Stock Variants Shopify in 2025

  • Home
  • Shopify
  • How to Hide Out of Stock Variants Shopify in 2025
hide out of stock variants shopify

How to Hide Out of Stock Variants Shopify in 2025

Introduction

Out-of-stock products are inevitable in eCommerce—but how you present them on your Shopify store can make or break the customer experience.

Imagine a visitor selects a size or color and sees “Sold Out” – it leads to frustration, drop-offs, and potentially lost sales.

The solution? Hide out of stock variants shopify automatically, so only what’s available is shown.

In this in-depth guide, you’ll learn:

  • How to hide out of stock variants in Shopify
  • Different methods (theme code, apps, inventory settings)
  • Best practices to manage product visibility
  • Bonus: How to show/hide entire out of stock products

Let’s clean up your product pages and improve your conversions.

What Are Hide Out of Stock Variants Shopify Product ?

Before we dive in, let’s clarify:

Variants are product options like size, color, material, etc.

For example:

Product: T-Shirt
Variants: Small / Medium / Large in Blue / Black / White

When a variant like “Large – Blue” is out of stock, you can:

  • Keep it visible with a Sold Out label (default behavior)
  • Or hide it completely to reduce buyer confusion

Let’s explore both options and how to implement them.

How to Hide Out of Stock Variants Shopify

Option 1: Hide via Theme Code (for Developers)

This method requires editing your Shopify theme’s Liquid code to check inventory levels and conditionally hide out-of-stock variants.

Step-by-Step Instructions:

  1. Go to Online Store → Themes → Edit Code
  2. Find and open product-template.liquid or main-product.liquid (depends on theme)
  3. Locate the variant loop – usually something like:

liquid

CopyEdit

{% for variant in product.variants %}
  1. Add a condition to skip variants with zero inventory:

liquid

CopyEdit

{% for variant in product.variants %}

  {% if variant.available %}

    <!-- Render Variant -->

  {% endif %}

{% endfor %}

This hides the variant if variant.available is false.

Note: Make sure your Inventory Management is enabled in Shopify Admin, or this logic won’t work.

Bonus: Disable Unavailable Variant Options (Not Fully Hide)

If you want to disable or grey-out out-of-stock variants (instead of hiding), use JS or your theme’s settings to disable dropdown options.

Option 2: Use Shopify Apps (No Code Required)

Don’t want to touch code? Use apps to manage variant visibility dynamically.

Best Shopify Apps to Hide Out-of-Stock Variants:

App NameFeaturesFree Plan
Out of Stock PoliceAuto-hide sold-out variants & productsYes
StockyPhiVariant-level hiding with schedulingYes
AutoHide Soldout ProductsWorks with filters, collections, searchYes
Wipeout by StoreBuilderBulk hide/unhide out-of-stock itemsYes

Most apps allow:

  • Auto-hide of sold-out variants
  • Auto-unhide when restocked
  • Logs for visibility changes

Option 3: Use Shopify’s Inventory Settings (Limited)

If you don’t want to use code or apps, here’s a native workaround:

  1. Go to Products → Inventory
  2. Set “Continue selling when out of stock” to unchecked
  3. For Buy buttons, you can hide them using theme settings

While this doesn’t fully hide variants, it prevents sales and may disable selection depending on theme behavior.

Not a complete solution, but useful if combined with theme customizations.

Bonus: How to Hide Entire Out-of-Stock Products

If all variants of a product are out of stock, you might want to hide the whole product from:

  • Collections
  • Search results
  • Homepage

Here’s how to do that.

Method 1: Use Automation Apps

  • Out of Stock Police
  • AutoHide Soldout Products

These apps can automatically remove out-of-stock products from:

  • Collections
  • Search
  • Recommendation sliders

Method 2: Use Shopify Flow (Shopify Plus)

If you’re on Shopify Plus, you can automate this:

Flow Example:

vbnet

CopyEdit

Trigger: Inventory Level Changes

Condition: Inventory = 0

Action: Remove product from sales channel

Best Practices for Inventory Visibility in Shopify

  1. Always hide variants that can’t be purchased
  2. Show a restock notification option if you keep variants visible
  3. Don’t confuse customers with “ghost variants” that don’t exist
  4. Monitor out-of-stock analytics to forecast demand
  5. Schedule variant visibility changes during product launches

How This Impacts Your Conversion Rate

By hiding out-of-stock variants, you:

  • Eliminate friction during buying process
  • Improve product page clarity
  • Reduce cart abandonment
  • Deliver a more polished brand experience

According to Baymard Institute, 18% of shoppers abandon carts due to unclear or unavailable options. Don’t be one of them.

Shopify Theme Compatibility Notes

Not all themes behave the same way.

  • Dawn / Online Store 2.0 – fully customizable with Liquid
  • Debut – may require JavaScript tweaks
  • Prestige / Empire – often have built-in “hide sold-out” toggles

Always test on a duplicate theme before pushing changes live.

FAQ – Hide Out of Stock Variants Shopify

Can I automatically hide out of stock variants Shopify?

Not by default, but you can do so using Liquid code or apps like Out of Stock Police or AutoHide Soldout Products.

Will hiding variants affect SEO?

No – if variants aren’t generating unique URLs, they won’t be indexed. But hiding entire products might reduce indexed pages if not handled properly.

What happens when the variant is restocked?

If you’re using an app or automation, the variant will automatically be shown again when inventory is available.

Can I hide only specific options like a color or size?

Yes, with custom code or advanced apps, you can hide only specific variants like “XL – Red” while keeping others visible.

What if I want to show the variant but disable it?

You can grey out or disable sold-out variants using JavaScript or theme settings instead of fully hiding them.

Final Thoughts

Managing inventory visibility is more than just logistics—it’s a UX decision that directly affects how your brand is perceived.

Hide out of stock variants Shopify ensures that customers only see what they can buy, which leads to:

  • Cleaner product pages
  • Higher conversion rates
  • Fewer customer complaints

Whether you use apps, Liquid code, or Shopify Plus automation, the important thing is to maintain a frictionless shopping experience.

And remember, if you do hide out-of-stock items, consider offering a “Notify Me When Back in Stock” feature to recover those lost sales.

Make a comment

Your email adress will not be published. Required field are marked*

Prev
Next
Drag
Map