Unexpected Behavior After Calling Shipping Rates API Endpoint

RosannaVecchio
Shopify Partner
1 0 3

Hello, 

 

We use the Shipping Rates endpoint of the Shopify AJAX API at

https://shopify.dev/docs/api/ajax/reference/cart#generate-shipping-rates to show all shipping rates available.

The problem is this call (/services/currency/update?) is unexpectedly modifying the store currency when you launch a request for that Shipping Rates endpoint

 

That call changes the store currency, probably unintentionally, to the currency of the country chosen to collect the shipping rates.

 

I think this behavior did not occur before, this is a bug or incorrect behavior and this call should update the currency (referring to the shipping address) only on the checkout page.

Because if it works, as it does now, on every store page, any app that makes a request to the Shipping Rates endpoint for an specific country automatically causes the entire store's currency to change to this country currency.

Can someone from Shopify confirm that they are aware of the issue and working on a solution?

We have an app with more than 5,700 merchants depending on that feature.

 

Thanks in advance.

Reply 1 (1)

Liam
Shopify Staff
2731 301 780

Hi Rosanna,

 

Thanks for flagging this - we're looking into this issue and I'll report back here when I have an update.

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog