Shopify 2.0 Dawn - How to hide unavailable variants?

Hi team,

If you’re wondering about the lack of updates to my hack; Unfortunately, after 10 years of Shopifying, the company I work for has made the ill-fated decision to move away from Shopify. Which means I no longer have an active interest in the platform.

I created this hack with zero prior knowledge of Javascript. I made it open source as I was actually hoping someone with a bit of a background would have used my code as a proof of concept and made a more robust version. But alas, no one has suggested any changes or fixes.

So, my code will remain unstable at this point (some people have found success, some have come across the loop issue, I’ve seen both and I’m not sure how to fix it).

For anyone wanting to know why it’s broken in the new version, it’s because Dawn now removes the entire selector block on each change which in turn removes the change detectors I had on each selector. So, each time the entire block is removed and re-added, I had to add a new mutation observer in (which is probably causing the infinite loop issue).

I’ll be back to Shopify one day, hopefully by then someone will release a better version. Because, as it seems, this is a fundamental issue that Shopify is not going to resolve themselves.

Until then, I’m not sure what you can do to resolve this, but in any case, good luck and happy eCommercing!