Why does the option appear even when it is unpublished?

Short description of issue

The option remains visible even when unpublished.

Link to Shopify Store

Reproduction steps

I have set the status of a variant to “unpublished,” yet the corresponding option still remains visible within the Theme Editor. My goal is to completely hide this “unpublished” option; although it no longer appears in the Custom Liquid editor, it continues to be displayed in the online store.

Additional info

no

What type of topic is this

Troubleshooting

Upload screenshot(s) of issue

Hey @Alam_XrtoTech - thanks for flagging this. Just to confirm, when a variant is unpublished from a specific channel, that variant and its related option/pricing should be hidden on that channel so it is odd if ti’s still showing up there.

If you’re still seeing the option on the Online Store, could you share the product URL, the exact option value that was unpublished, and whether you’re seeing it on the live storefront outside the theme editor, ideally in a fresh/private browser session?

If this product form or variant picker has custom Liquid/JS, it would also help if you can share that snippet, since the theme may be rendering option labels separately from the currently published variant data. Let me know if you’d rather set up a DM for this and I can take a look :slight_smile:

@Alan_G Hi, The same issue also appears in other official stores; the Liquid code is as follows:

{% for variant in product.variants %}
  {{ variant.title }}:
  {% if variant.available %}
    in stock<br>
  {% else %}
    out of stock/unaviable<br>
  {% endif %}
{% endfor %}

The specified variant has been hidden; why are the options still visible? This is an issue.And how can I DM you? I couldn’t find the option.

Hey @Alam_XrtoTech - thanks for sharing the snippet, that helps.

I think the main thing here is that your Liquid is still printing every variant title:

{% for variant in product.variants %}
  {{ variant.title }}:

So even if that variant isn’t available on the Online Store, the theme can still output its name because the code is telling it to. The variant.available check only affects the text you show after that point; it doesn’t automatically hide the variant title that was already rendered.

If you only want to show available variants, you could move the title inside the availability check:

{% for variant in product.variants %}
  {% if variant.available %}
    {{ variant.title }}: in stock<br>
  {% endif %}
{% endfor %}

For the actual variant picker/buttons, some themes will still show unavailable options as disabled so buyers can see the option exists but can’t select it. If you want those values removed completely, that’ll usually need a small change in the theme’s variant picker logic.

For DMs, if you don’t see the message option on my profile, no worries. You can keep the details here as long as there’s no private customer/store data. The product URL and the exact option value you expect to be hidden would be enough for me to take a closer look. I can still set up a DM if need be though - just let me know!

Hope this helps!

@Alan_G Hello. I tried the method you suggested, but it did not resolve the issue. The problem persists exactly as before: hidden variant options are still being displayed. I have tested almost every theme available, and this issue appears in all of them—you can try the “Horizon” theme to verify this yourself. Thank you; please provide a solution as soon as possible.

@Alan_G variants.available displays correctly regardless of its placement, but the variant selector itself renders with errors.

@Alan_G Hello—are you still following this issue? It still hasn’t been resolved.

Hey @Alam_XrtoTech, sorry for the delayed reply, just following up on some forum posts today. I did some more checking here, and I want to clarify the behaviour a bit.

For multi-option products, the unpublished variant combination itself should not be purchasable or shown as an available variant. However, the option value can still appear in the picker if that same option value is used by another published variant. In that case, themes like Horizon may show the value as unavailable/disabled rather than removing it entirely.

For example, if Small / Blue is unpublished but Medium / Blue is still published, Blue can still appear as an option value, but Small / Blue shouldn’t be selectable or addable to cart.

Could you share:

  • the product URL or preview link,
  • the exact unpublished variant combination,
  • whether that option is only shown as disabled/struck through or can actually be added to cart,
  • and whether another published variant still uses that option value?

If the unpublished variant is still purchasable, or the option value appears even when no published variants use it, that would be worth escalating further. If the goal is to remove disabled option values entirely, that would need a theme-level change to the variant picker logic. Happy to help out further with this though!