Shopify / buy-button-js

BuyButton.js is a highly customizable UI library for adding ecommerce functionality to any website.

Home Page:http://shopify.github.io/buy-button-js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

vincentkoeckerling opened this issue · 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?

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

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>