Liquid, JavaScript, themes, sales channels
I'm getting the following error in my Javascript console and my Buy Button is not rendering on the web page as a result:
TypeError: Cannot read properties of undefined (reading 'indexOf')
at buy-button-storefront.min.js:10:5524
This looks like an issue w/ Shopify's code, correct? Have they made breaking changes to the API in the last year? The embed code for this button is a couple of years old.
What's strange is that the Buy Button that generated this code has disappeared from my Shopify Settings, so I'll need to create a new one. How could it disappear like that?
I had a similar issue and was able to resolve it by upgrading the version of buybutton from 1.0.0 to 2.4.0
Previously: "https://sdks.shopifycdn.com/buy-button/1.0.0/buybutton.min.js"
Now: "https://sdks.shopifycdn.com/buy-button/2.4.0/buybutton.min.js"
Maybe the docs need updating because it's forever referencing the 1.0.0 build.
User | RANK |
---|---|
38 | |
26 | |
13 | |
11 | |
8 |
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023