How can I hide sold out variants in Dawn theme 11.0?

Topic summary

Goal: hide sold‑out product variants in Shopify’s Dawn theme via code or apps.

What was tried:

  • Custom Liquid code added to the product template was suggested (with reminder to Save and refresh). OP reported it didn’t work for their store. Screenshots were requested to debug.
  • Others attempting similar in Craft 13 and Dawn 13 said the initial approach didn’t work, noting variant_picker settings differences.

Latest updates/outcomes:

  • A community article’s code was later shared; at least two users confirmed it works on Dawn (one said it “actually worked”).
  • However, even after hiding sold‑out variants on the product page, collection/filtering still shows unavailable options (e.g., filtering by size M returns items whose M is out of stock).

Alternatives offered:

  • HiVar: Hide Sold Out Variants app (supports Online Store 2.0; free for single‑option free themes, paid for 2–3 options).
  • Stamp – Variants on Collection app to display and filter variants per collection/home page, with options to show/hide specific variants.

Status:

  • Partial resolution via the linked code for Dawn product pages; filtering behavior remains an open issue. Theme/version differences (Dawn 13, Craft 13) may require tailored solutions. Images and demos were referenced but not essential to the fix.
Summarized with AI on December 11. AI used: gpt-5.

there you go
https://decorforfun.myshopify.com/products/adidas-entrada-18-jersey-black