buy-button-js icon indicating copy to clipboard operation
buy-button-js copied to clipboard

Documentation recommends using v1.0.0 which doesn't work anymore

Open vincentkoeckerling opened this issue 1 year ago • 2 comments

The documentation gives the following code for including the library:

<script src="http://sdks.shopifycdn.com/buy-button/1.0.0/buybutton.js"></script>

But version 1.0.0 does not work anymore. When you try to create a cart it throws

buybutton.js:15150 TypeError: Cannot read properties of undefined (reading 'checkoutCreate')

Is it possible to update the documentation to make it clearer a newer version is required?

vincentkoeckerling avatar Aug 29 '23 14:08 vincentkoeckerling

Following - something changed in the code that broke my website. Looking to get an update on this.

dannytrann avatar Sep 09 '23 05:09 dannytrann

I personally resolved this by using the latest minified version of the SDK:

<script src="https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js"></script>

amustill avatar Nov 21 '23 18:11 amustill