Shopify.StorefrontExpressButtons deprecated?

Shopify.StorefrontExpressButtons deprecated?

DannyM
Visitor
1 0 0

Does anyone know if Shopify.StorefrontExpressButtons was deprecated? I think you used to be able to run Shopify.StorefrontExpressButtons.initialize(); to show dynamic checkout buttons on ajax carts, but seems to just return undefined for me now.

 

If it has, is there a new way to manually trigger loading of dynamic checkout buttons? 

Reply 1 (1)

tim
Shopify Partner
3956 407 1466

Old post, but wanted to share solution I found. Looks like 

document.body.dispatchEvent( new CustomEvent( 'shopify:section:select' ) );

may help here.

Shopify code actually listens to  this event to re-initialize dynamic checkout buttons.

Just need to check that your theme sections JS would not do anything unwanted. 

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com