- Short answer
- Add Inventory stock is greater than 0 to each collection, matching all conditions; products added by hand or with one variant in stock stay
- Mixed variants
- With a Products source, one in-stock variant makes the Inventory stock condition true for the product, under either match option.
- Added by hand
- Conditions act only on auto-matched products; ones you added manually stay until you remove them.
- Online store
- Flow's Publish and unpublish template (Basic, Grow, Advanced, Plus plans) unpublishes a product, republishing it once a variant has inventory.
- Second template
- Flow's single-or-all-variants template unpublishes whole products, not variants; read its conditions before turning it on.
- Search
- Search has its own Out of stock products setting: displayed, hidden, or placed last (the default).
How do you add the stock condition to a collection?
Shopify's method works collection by collection: you add the condition to each collection you want cleaned up. Out-of-stock products are then removed from that collection, except ones you added by hand, and display in it again after you receive inventory.
- Turn on inventory tracking. Shopify requires it before you can hide out-of-stock products from collections; for many products, turn tracking on in bulk.
- Open the collection and go to its conditions.
- For Inventory stock, select is greater than and enter 0.
- Select Match all conditions. Shopify warns that this solution won't work if you set Products must match to any condition.
- Products
- Collections
Shopify counts an item as out of stock when inventory is tracked and its level is at zero or below, and the is greater than condition matches only a value greater than the one you enter. Continue selling when out of stock is possible only when inventory is tracked, Stop selling when out of stock is the default, and whether to keep selling at zero is a separate decision.
Why does a sold-out product still show in a collection?
One variant in stock keeps the product in. With a Products source, a condition on a product with variants is true if any variant matches, whether you select Match all conditions or Match any condition. Hiding only the sold-out size is a different mechanism: hiding sold-out variants.
Products you added by hand stay. Conditions apply only to products or variants that are matched automatically, and manually added ones are always contained in the collection unless you manually remove them.
A legacy manual collection holds what you picked. It includes the specific products that you choose. If the new collections model is available in your admin, your previous collections have already been converted to the new type. For a hand-picked set, Flow (next section) acts on the product rather than on one collection.
The catalog page is its own collection. To change /collections/all, you create a collection titled All, and Shopify's steps add an optional condition of Inventory stock is greater than 0 to hide products that are out of stock. See how a collection titled All changes the catalog page.
How do you hide it from the whole online store?
Use Shopify Flow to unpublish the product. Its template Publish and unpublish products based on inventory level is there to hide out of stock products from your online store and republish when they have at least one variant with inventory. The Unpublish product action makes the product unavailable on the selected sales channels, so it leaves the channel, not just one collection.
Shopify Flow is a free app available on the Basic, Grow, Advanced, and Plus plans.
- Apps
- Flow
Shopify describes the template Check if a single variant or all product variants are out of stock at all locations this way: "Hide products from the online store when either a single variant or all variants are out of stock across all locations." The template sits under the Unpublish product action, so it unpublishes whole products, not variants.
In the template preview we opened in a development store on October 18, 2026, the condition Check if a single variant is out of stock at all locations has its own branch, ahead of an Unpublish product action. Open the template in Flow and read its conditions before you turn it on.
To build your own workflow, Shopify names the Product variant inventory quantity changed trigger, a check on the productVariant.inventoryQuantity variable and the Unpublish product action. Inventory management apps are the other route: Shopify says some of them can automatically hide or delete products from your store when they're out of stock.
Does hiding it from collections hide it from search?
Search has its own setting, so set it separately. In Search & Discovery, out of stock products can be displayed, hidden or placed last in search and predictive search results; by default, unavailable products are displayed after all other matching results.
- Apps
- Search & Discovery
- Settings
None of the pages we read on October 18, 2026 (hiding out of stock products, collection conditions, and the Search & Discovery search settings, recommendations and filters pages) links a collection's stock condition to search. More on the app: Shopify Search & Discovery.
Two nearby features behave differently. On the product page, recommendations skip sold-out products, though a related product can still display if continue selling when out of stock is on, and a complementary product must have inventory above 0. Filters handle empty filter values, not products: you can move them to the bottom of the list or hide them entirely.
This page was written by AI. Separate AI agents that did not write it check its figures and claims against official sources and test its links and interactive tools. A human editor sets the site's editorial direction, topics and rules and checks that pages are complete and display correctly, but does not check their facts or edit their text. Details may change — always confirm critical data at shopify.com.
Editorial Policy