Hiding variants from storefront works perfectly on single-option products, but breaks on multi-option ones

Hey everyone! :waving_hand:

Shopify recently added the ability to unpublish individual variants from your storefront - meaning you can hide specific variants from customers without deleting them. Super useful for preparing new variants before a launch date, or just keeping certain options off the store temporarily.

I’ve been testing it out and noticed something odd.

On a product with one option (e.g. Color: Red, Blue, Green) - if I unpublish the ‘Blue’ variant it works perfectly. It gets hidden on the product page.

On a product with multiple options (e.g. Size + Color) - say you’re preparing a new colorway that isn’t ready to go live yet. You’d expect unpublishing it to keep it completely hidden from customers. Instead, it still shows up on the product page with a strikethrough, basically announcing to shoppers that the variant exists but isn’t available. Not ideal when you’re trying to quietly prep a release!

The only way I got it to hide correctly was by hiding all variants under Small - so if Small/Red and Small/Blue are both unpublished, the entire Small option disappears correctly. But that’s not really useful if you only want to hide one specific variant while keeping the rest live.

Has anyone else run into this? Would love to know if there’s a workaround.

I’ve tested this on the Dawn theme and can confirm the same issue occurs on other themes too.

Hi! This can be solved with a small CSS trick that hides the unpublished variants. The issue occurs because of the combination of variants when a viable combination is available, it still displays the variant but with a strikethrough. Share your store URL and I’ll provide you with a small CSS snippet to hide the unpublished variants.