How to Hide Out-of-Stock Products in Shopify with Flow

By Philip Dematis · 9/25/2025 · 3 minutes read
hide-out-of-stock-products-with-shopify-flow
Learn two simple Shopify Flow automations to hide products when they run out of stock. One removes them from your storefront completely, the other hides them without unpublishing, so you can still use them in bundles or apps.

Running a Shopify store means staying on top of your product catalog. One of the most common pain points is how out-of-stock products show up on your website. If a shopper clicks on an item only to see it's unavailable, (sometimes) it's not a preferrable experience.

You could manually hide products each time they sell out, but that takes time. Luckily, Shopify Flow makes it possible to automate this process with a couple of simple workflows.

This guide walks through two approaches:

  1. Hiding products completely when stock runs out.

  2. Keeping products active but hidden from the storefront, which is helpful in special cases.

Let’s go step by step.

Option 1: Hide products completely when they sell out

This is the most straightforward approach. When inventory hits zero, you can tell Shopify to automatically hide that product from your storefront.

Here’s how to set it up in Flow:

  1. Trigger: Choose "Product variant out of stock"

  2. Conditions (optional): Add filters if you only want this rule to apply to certain products, like items in a specific collection. Also, if the product has multiple variants, you can choose "If All of product variant / product / variants Available for sale equals false".

  3. Action: Add an "Unpublish product" block and choose the appropriate sales channels (e.g. Online store).

And that’s it. Once a product variant sells out, Flow will handle the rest.

This option works well if you don’t need the product live in any way once it’s gone. The product isn’t unpublished, but it’s not visible to shoppers anymore.

Option 2: Hide products without unpublishing

Sometimes you need a bit more control. Maybe a product is sold out, but you still want it active in the background.

Here are some cases where that might matter:

  • The product is part of a bundle or kit.

  • You use an app that references the product.

  • You want to track or reuse the product without showing it in the storefront.

For that, you can use a slightly different workflow.

  1. Trigger: Again, use "Product variant out of stock"

  2. Conditions: Add any filters you need.

  3. Action 1: Add a "Remove product from collections" block. This clears it from being browsable on your site.

  4. Action 2: Add an "Update product metafield" block. Add a definition for it, if you don't already have one.

    • Namespace: seo

    • Key: hidden

    • Value type: Boolean

    • Value: 1

This keeps the product active in Shopify but hidden from your storefront, and search engines. Visitors won’t stumble across it in navigation or search, but you’ll still have access for backend needs.

Why automating this matters

Setting up these automations only takes a few minutes, but it saves hours in the long run. More importantly, it reduces errors. Manually hiding products is easy to forget, especially if you have hundreds of SKUs.

This automation helps you:

  • Keep your storefront clean and uncluttered.

  • Avoid disappointing customers who land on sold-out items (that are not expected to be available again).

  • Maintain flexibility for special use cases like bundles or app integrations.

FAQ

Is it good practice to hide out-of-stock products completely? This depends. Sometimes, the product will never be available again so unless it's contributing to SEO, there's no need to show it. Other times, you may want to offer an option for the visitor to be notified when it's back in stock.

Do I need a developer to set this up? No. Shopify Flow is designed for store owners and managers. The steps above are no-code and can be done directly in the Flow app.

Will hiding products affect my SEO? In both these cases, the product won't be available as a result on search engines. In the first case, you can create a redirect, if you'd like to present another page in the product's place.

What happens when the product is back in stock? You’ll need a separate, reverse automation for that. For example, trigger "Variant back in stock" and add an action to "Publish product" or "Add to collections."

Can I choose which products this applies to? Yes. Add conditions in Flow, like "product belongs to X collection," so only certain products follow the rule.

Wrapping up

Hiding out-of-stock products doesn’t have to be a manual task. With Shopify Flow, you can set simple rules that keep your storefront tidy while giving you flexibility when you need it.

Start with the basic hide option if you want a quick solution. If you have more complex needs, try the metafield method. Either way, your customers will have a smoother shopping experience, and you’ll spend less time cleaning up product pages.

Share icon
Facebook logoX logoLinkedIn logo

More articles

Contact us

Start a project. Or ask us anything.

200+projects completed
100+Shopify clients
10+Shopify Plus clients
Shopify partners logoShopify Plus logo