Hide out of stock variants

Hide out-of-stock variants

Use Custom CSS to hide variant options that are out of stock. This removes values that appear with a strikethrough and disabled options in dropdowns.

1

Go to Online Store > Themes > Customize

2

Open Theme settings > Custom CSS

3

Paste the following code:

/* Hide out-of-stock variants with strikethrough */
.strikethrough,
.linethrough {
  display: none !important;
}

/* For dropdown options that are disabled */
select option:disabled {
  display: none !important;
}
4

Click Save

Last updated

Was this helpful?