Hi,
I have implemented the Klaviyo Back in Stock snippet on multiple Shopify themes using the guide.
There's a bug when changing variants - the button disappears because JavaScript replaces parts of the page differently than in Shopify’s Dawn theme.
One solution is to reload the page after switching variants, however that’s not the best user experience.
Most themes have events you can listen to, so if I could use something like `klaviyo.refresh()`, that would be great. I tried to put initialization code in a function and rerun it, but that did not work.
Does the script provide a way to rerun the Back in Stock initialization?
I hope you have some ideas.
Thank you!
Wiebe