I’ve added a new variant metafield ‘inactive’ and am checking it in the ‘product-variant-options.liquid’ dawn theme template to suppress options which have this metafield set to true. This is working as expected when the page first loads, but if a different option is selected which matches a variant which is not inactive, the option is not reappearing.
I am assuming that this would need to be controlled by some JS logic, which will need to determine on the client if the newly selected option matches a non inactive variant. I’ve been trying to track down where the js logic is that controls the enabling and disable of options so I can add my custom requirements.
Where in the dawn theme is this controlled? In the global.js I’ve found a few places that looked promising (VariantSelects, VariantRadios) but adding console.log calls don’t show anything in the browser.
Any pointers would be appreciated!