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

Will this package be upgrade to JS Buy v3?

Open KasimMahroof opened this issue 1 year ago • 14 comments

The supporting package, js-buy-sdk, is being deprecated as of January 2025 and looks like customers won't be able to purchase anything if you don't update by July 1st, 2025.

The two path ways the deprecation notice suggests to take is upgrade to v3 of the package or move completely to using the Storefront API Client.

Will this package be updated to follow what has been suggested as part of the upgrade guide?

KasimMahroof avatar Dec 06 '24 16:12 KasimMahroof

I have a similar question.

Jesperanza avatar Dec 30 '24 20:12 Jesperanza

This is a very, very critical question that I believe will affect a LOT of stores. This buy-button-js library provides so much of the UI (cart, buy buttons etc) that I didn't have to create from scratch. Ditching this repo and converting to using only the Storefront API would require more than updating a few calls. I would have to build all of the UI functionality myself that this library is providing. And, I have used this library in many websites for my agency. For me, and I'm sure for many others, this library not getting updated would be a really big deal.

SharpleafCC avatar Jan 08 '25 15:01 SharpleafCC

@KasimMahroof I just got off a group call called "Ask the Experts: Shopify Checkout API Deprecation with Shopify Checkout Team". I raised this question to them and they said they they are planning on updating the js-buy-sdk to v3 of the buy sdk. They are aiming to have the V3 ready by end of January (which, they said will just be a "remapping" of the underlying calls mostly). And then this will get updated shortly after. However, at some point, this library wont be maintained in this way anymore. They said that there might be a community driven solution, there might be a Shopify solution for this kind of UI component library, but there's no official roadmap on their side, and we'd just have to wait and see on the community side

SharpleafCC avatar Jan 08 '25 17:01 SharpleafCC

Oh, and they also said that they would try and update the messaging about this, since there's literally 0 information on the buy-button-js-specific pages about this deprecation or what's going on :)

SharpleafCC avatar Jan 08 '25 17:01 SharpleafCC

This deprecation surely would impact the Buy Button sales channel, since the snippet of code it asks you to copy and paste uses a copy of the buy button script at https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js

If I'm understanding this right, Shopify will also need to update this script, otherwise every buy button that has been embedded using this feature will stop working.

Mesuva avatar Jan 09 '25 22:01 Mesuva

I updated my admin backend api calls for my custom app to use 2024-10 api and I can no longer use this library with my storefront access token from the same custom app. So I guess April is now? I'm not sure if anyone else is having this problem.

ianjosephwilson avatar Jan 30 '25 23:01 ianjosephwilson

Has there been any progress on this issue? Any timelines? Will this package be upgraded to use JS Buy SDK v3?

cardinalm7 avatar Feb 06 '25 19:02 cardinalm7

My buy button has also stopped working. This sucks

jeffglynn avatar Feb 12 '25 01:02 jeffglynn

I have a similar question, will this be upgraded before April 1st ?

merwinpoulose avatar Feb 12 '25 23:02 merwinpoulose

Can someone explain why there are 2 dates floating around? 1st of April 1st of July

Which one is the correct deadline to move to another solution? If the issue is that API version 2024-10 will no longer be available, then the deadline should be 1st of July, because then all API requests to 2024-10 will be forwarded to 2025-01 which no longer provides APIs necessary for the buy button JS Library? Am I missing something?

So if I'm using latest version of buy button JS, shouldn't it continue to work until July?

https://shopify.dev/changelog/js-buy-sdk-deprecation-notice

evaldas-raisutis avatar Feb 19 '25 18:02 evaldas-raisutis

One of my stores went down last week and I haven't been able to get it fixed. https://github.com/Shopify/js-buy-sdk/issues/1001#issuecomment-2661932285

While online with chat today, Shopify's support website went down with an nginx error 503.

Shopify's CEO is screwing around on Twitter posting about AI, his friends who crash race cars, and how Americans are too dumb to use the metric system.

Meanwhile when you click a buy button it still says this in the console:

Uncaught (in promise) Error: [{"message":"The Checkout API has been deprecated and is not accessible for new usage. For more information, please visit https://shopify.dev/changelog/deprecation-of-checkout-apis","path":["checkoutCreate"],"locations":[]}]

Nothing has changed on my site in over a year.

chadwackerman avatar Feb 24 '25 15:02 chadwackerman

Hi folks, although the general date for the checkout API sunset is April 1st, any shops using the Buy Button JS library will receive an automatic one-time extension until July 1st for the Checkout API sunset (ie: sunset of SF API version 2024-04).

The Buy Button JS library will get updated to the JS Buy SDK v3 before April 1st.

@jeffglynn we are sorry to hear that your Buy Button has stopped working. Could you please let me know the following information (or open up a Shopify support ticket): your shop ID, date your Buy Button stopped working, and link to the webpage containing your Buy Button.

kdaviduik avatar Feb 24 '25 16:02 kdaviduik

Hi folks, although the general date for the checkout API sunset is April 1st, any shops using the Buy Button JS library will receive an automatic one-time extension until July 1st for the Checkout API sunset (ie: sunset of SF API version 2024-04).

The Buy Button JS library will get updated to the JS Buy SDK v3 before April 1st.

@jeffglynn we are sorry to hear that your Buy Button has stopped working. Could you please let me know the following information (or open up a Shopify support ticket): your shop ID, date your Buy Button stopped working, and link to the webpage containing your Buy Button.

Hi @kdaviduik , We are having issues with 2 of our 3 sites. I reached out to support via our Partner Portal but their response was not very helpful. Are you able to reach out to me directly in regards to ticket ID is 55428849

Thanks!

landykos avatar Feb 26 '25 18:02 landykos

Hi @landykos. Sorry to hear that you're having issues, it sounds like that shouldn't be the case if you're using Buy Button JS so I definitely want to look into that further. I don't seem to have access to the Partner Portal so I have asked internally to get more information, but in the meantime so I can start investigating you could also post here or email me ([email protected]) the relevant shop IDs, shop URLs, and any other relevant info (like when you started noticing the issues).

kdaviduik avatar Mar 06 '25 02:03 kdaviduik

Hi! Do we have an update about this issue? When do we expect to have the updated version to be released? The Drupal Shopify module uses this buy-button-js library and as of now, the available library version we can pick is v2.4. Thanks!

jozl05 avatar Mar 25 '25 02:03 jozl05

Any update on this?

muskie9 avatar Mar 31 '25 19:03 muskie9

@juanpprieto @kdaviduik So its April 1st and sites started to break. The library still isn't updated (like promised) and the site that I checked didn't get the promised "an automatic one-time extension until July 1st for the Checkout API".

Can we please get an update on this?

newkind avatar Apr 01 '25 06:04 newkind

@newkind in a quick sprint last night I forked this package and updated the requirement for shopify-buy to 3.0.2. I then ran the yarn build command and using the new buybutton.min.js that was generated I believe our stores are still working. I had to rework some of our site code but overall that seemed to do the trick.

I'm just loading the buybutton.min.js locally now vs the CDN as we were previously. I didn't push the updates to my fork as it seems to be a pretty simple update to do after playing with it a bit.

muskie9 avatar Apr 01 '25 14:04 muskie9

For those struggling, you can use @juanpprieto 's PR version now in your package.json:

"@shopify/buy-button-js": "0.0.0-snapshot-20250320215055"

Or by hand, download the package and extract buybutton.min.js:

wget "https://registry.npmjs.org/@shopify/buy-button-js/-/buy-button-js-0.0.0-snapshot-20250320215055.tgz"
tar xf buy-button-js-0.0.0-snapshot-20250320215055.tgz package/dist/buybutton.min.js

However, clarification going forward as to the future of the Buy Button from product management would greatly be appreciated, @kdaviduik . It sounds like Shopify will be ending JS Buy SDK support as of 2026-01-01, which would also kill the Buy Button. For those of us with certain Shopify account types, this would entirely deprecate our only available sales channel.

wohali avatar Apr 01 '25 17:04 wohali

For anyone interested in the diff of the above files compared to the original before implementing some code in production from a stranger 😅 sorry @wohali you can checkout https://github.com/DerBasler/buy-old-to-community-mini/commit/fce59fcb54a9b80463924674bdc34b7c7e48c492 or even better check it yourself. And thx for the work @juanpprieto From my point of you this looks clean ^^

DerBasler avatar Apr 02 '25 08:04 DerBasler

Hey everyone, I saw the comments about the Buy Button breaking on April 1st, but my sites using it are still working fine—I can add products to the cart without issues. What exactly is breaking? I haven’t made a test purchase yet, so I just want to check if there's something specific I should look out for.

wolfgangschoeffel avatar Apr 02 '25 09:04 wolfgangschoeffel

@wolfgangschoeffel so there where 2 dates going around but I am pretty sure July 1st, 2025 is the real deadline.

DerBasler avatar Apr 02 '25 09:04 DerBasler

It feels very account specific.

I have some sites with simple producing options, working when adding to the cart. But I can see other integrations, with the same buy-buttton script being used from the CDN, and the same kinds of product options simply failing to add to the cart. The cart opens, but no products get added - and javascript errors appear regarding the Checkout API.

Why some accounts work, and some don't, is a mystery.

Shopify have really dropped the ball here, missing their own deadline by several months.

Mesuva avatar Apr 02 '25 09:04 Mesuva

They did a weird thing, too clever by half. They created a whitelist of sites permitted to use the API. I don't know what motivated this. I assume they wanted to discourage any new sites from taking a dependency on technology that was going to change. Assuming best intentions, this is nannying and overreach.

But they botched the whitelist and didn't catch all the sites that were using it. I assume this means there are errors in their logging systems. The whole process reveals that Shopify isn't a well-managed engineering organization. The individual employees have gone above and beyond for me, but they shouldn't be put in this situation.

I emailed the CEO twice to alert him of the management problem and this issue, especially since it's a repeat of what happened back in 2022. He's busy goofing around on Twitter making fun of Americans for not using the metric system. No disagreement there, however letting stores have more than one size of box in their store and calculating shipping prices correctly might be a better use of his time than chirping about centimeters vs inches in a chatroom.

chadwackerman avatar Apr 02 '25 15:04 chadwackerman

@Derbasler wrote:

sorry @wohali

No worries. For those who don't know who GitHub Actions and Pull Requests work, it could be unnerving to trust what I posted.

But: It's really just the PR already on this repository, written and contributed by a Shopify employee:

https://github.com/Shopify/buy-button-js/pull/888

The GitHub Action on this repo auto-compiled and uploaded the snapshot binaries to NPM under the real, honest-to-goodness @shopify/buy-button-js project:

https://www.npmjs.com/package/@shopify/buy-button-js/v/0.0.0-snapshot-20250320215055

It would be difficult to compromise that binary. If we start distrusting employee's contributions to their own projects, we might as well not bother engaging in open source development at all.

wohali avatar Apr 03 '25 04:04 wohali

Hi folks, v3.0 of Buy Button JS is available on npm as of last week. This uses JS Buy SDK v3 under the hood.

In terms of future plans for Buy Button JS, we are planning on moving it off of JS Buy SDK v3 and onto the storefront API client in the next few months. We do not plan on ending support for Buy Button JS in January 2026 (when JS Buy SDK v3 reaches its end of life).

For all users of the JS Buy SDK or Buy Button JS libraries (who were using these libraries prior to the checkout API end of life), you should have received an automatic checkout API extension until July 1st. Ie: version 2024-04 of the storefront API should continue to work as normal until July 1st. If that is not the case for your site, you can contact Shopify support or email me ([email protected]) a link to your site so that we can investigate why that isn't happening.

  • April 1st was the deadline for the checkout API migration for anyone NOT using the Buy Button JS or JS Buy SDK libraries
  • I do not have access to specific ticket IDs, but a link to your site is sufficient for me to investigate

cc @KasimMahroof @Jesperanza @SharpleafCC @Mesuva @ianjosephwilson @cardinalm7 @jeffglynn @merwinpoulose @evaldas-raisutis @chadwackerman @jozl05 @muskie9 @newkind @DerBasler @wohali

kdaviduik avatar Apr 14 '25 17:04 kdaviduik

Is Shopify going to provide a CDN url for this updated script?

I couldn't find it on https://sdks.shopifycdn.com, and https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js appears to still be outdated.

The only place I could find it was https://cdn.jsdelivr.net/npm/@shopify/buy-button-js/lib/buybutton.umd.min.js

@kdaviduik

Mesuva avatar Apr 16 '25 18:04 Mesuva

Hi @Mesuva,

We were running into an issue when trying to publish the new version to Shopify's CDN but we got it resolved! You can use v3.0 from http://sdks.shopifycdn.com/buy-button/3.0.2/buybutton.js or http://sdks.shopifycdn.com/buy-button/latest/buybutton.js.

kdaviduik avatar May 08 '25 22:05 kdaviduik

@kdaviduik Thanks for sorting this out. I see that buybutton.min.js is also available on the CDN.

Sometime in the last week or so, one of my low-volume stores went down again due to the whitelisting-for-deprecated-API stuff you're doing. Please, please do not attempt that again in the future. There are dollars at play here on both sides. Just keep the stuff running please.

The end result of all this churn and panic and automated emails was making a simple change from "2.4.0" to "3.0.2" and everything worked on all my sites. Had I dared to use "latest" even that wouldn't have been required. That's how things should work in 2025. Shopify is not particularly cheap and I'm happy to pay so long as it lets me focus on my business, not yours.

chadwackerman avatar May 09 '25 15:05 chadwackerman