Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client experienced an issue with PayPal during checkout in the UK store of their WPML-configured multistore setup. The error displayed was related to currency mismatch, expecting GBP but receiving USD instead.
Solution:
We recommend updating your WPML, String Translation, and WCML plugins to the latest versions. After updating, deactivate and reactivate these plugins to clear any plugin cache. Also, clear your browser cache. This approach resolved the issue in a staging environment, ensuring that the prices and currency displayed correctly according to the site's multicurrency settings and were reflected accurately in the PayPal popup.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 6 replies, has 1 voice.

Last updated by Waqas Bin Hasan 3 months, 4 weeks ago.

Assisted by: Waqas Bin Hasan.

Author Posts
February 28, 2025 at 11:15 am #16760416

danishp

Background of the issue:
I created 3 stores using WPML, with the default being US and the other two being UK and AU. In the UK store, at the time of checkout, I encountered an issue with PayPal. The issue can be seen on this page: hidden link. I expected to see: <script src="hidden link"></script>.

Symptoms:
When I click on PayPal during checkout in the UK store, it shows the error: 'Expected currency from order api call to be GBP, got USD. Please ensure you are passing currency=USD to the sdk url.' Instead, I got: <script src="hidden link"></script>.

Questions:
How can we resolve this error?

March 3, 2025 at 6:20 am #16766891

danishp

Please reply its been almost 3 days for this issue and there is no reply from your side

March 3, 2025 at 11:00 am #16768447

danishp

Please update me on this

March 4, 2025 at 8:40 am #16771923

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support and our apologies for delayed response due to current work load in the support.

I just checked your site but unfortunately I don't have a PayPal arrangement to check for the issue. However, I observed that I saw prices in GBP and after clicking the PayPal button, I saw GB as the selected location as well.

However, when I changed the location in PayPal popup to USA, cancelled and returned, the prices were in USD on the cart.

So can you please check that when you click that PayPal button, do you see the correct location in PayPal popup? Or does changing that makes any difference anyways?

On the other hand, I'll recommend checking the following:

Take a full backup of your site and database before proceeding. It is highly advised to try these on a dev or staging site first, so your live site isn't compromised.

1) Update WPML plugins (including WCML) to the latest versions.
2) Deactivate all plugins except WPML, String Translation, WCML and WooCommerce.
3) Switch to a standard theme like 2024 or 2021.
4) Check for the issue if it still happens.

It'd be great that if you can check the above mentioned in a test/staging site with a test PayPal accounts, so if the issue persists we can then investigate in test/staging site without compromising the live site.

Please let me know and I'll try my best to help you further on the matter.

Regards.

Screenshot 2025-03-04 133432.jpg
Screenshot 2025-03-04 133406.jpg
Screenshot 2025-03-04 133342.jpg
March 7, 2025 at 7:09 am #16786253

danishp

Hi Waqas,

I hope you're doing well.

I'm currently facing an issue on the checkout page. For example, when a customer lands on the en-au or en-gb market, everything works fine, and the currency changes correctly. However, when I proceed to the checkout page, enter my details, and click on PayPal, I receive the following error:

For en-au: "Expected currency from order API call to be AUD, got USD. Please ensure you are passing currency=USD to the SDK URL."
Reference: PayPal SDK Customization

For en-gb: "Expected currency from order API call to be GBP, got USD. Please ensure you are passing currency=USD to the SDK URL."
Reference: PayPal SDK Customization

Additionally, when I refresh the checkout page, the currency reverts to USD instead of displaying the correct currency for the selected market (for example, AUD for en-au).

I have recorded a simple Loom video to better illustrate the issue. You can view the video here:
hidden link

I kindly request you to look into this as soon as possible. Your assistance will be greatly appreciated.

Looking forward to your response.

March 7, 2025 at 11:40 am #16788108

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates.

I checked your video and then tried to reproduce the same in your staging site but this seems to work fine for me. I've tried connecting to Australia via VPN, as well as, my default location (without VPN) and in all cases I couldn't see that error.

Here's my screen recording: hidden link

I also found one of your previous reports about it (https://wpml.org/forums/topic/issues-in-paypal-while-payind-form-different-currencies/) and I agree with my colleague that it is not a WPML or WCML issue, it is a PayPal configuration you must enable on your site. You need to add the JavaScript SDK script. Please follow the instructions in the their guide at hidden link.

I also found a hidden link">discussion on the web which may give some clue as well.

Please check in your side and it'd be great if you can share more details about your SDK configs and WCML's multicurrency settings. Remember to mask or strip any sensitive information.

P.S.: I'll be off over the weekend and 'll be able to attend on Monday.

March 10, 2025 at 6:47 am #16794447

danishp

Dear Waqas,

Thank you for your response.

I have reviewed the video you provided and noticed that while you're checking the country settings, the issue seems to lie with the currency configuration. In your video, I observed that on the checkout page, when selecting the en-au language, the currency is still showing as USD instead of AUD. Similarly, when the en-gb language is selected, GBP is displayed instead of the expected currency.

I’ve attached a screenshot for further clarification on the issue.

Could you kindly assist me with a more accurate solution for this? I would appreciate your guidance on resolving this issue as soon as possible.

Thank you for your support.

Screenshot1.png
Screenshot2.png
Screenshot3.PNG
March 10, 2025 at 11:38 am #16796205

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates.

I need to take a closer look at your site. So I request temporary access (WP-Admin and FTP), preferably to a test site where the problem has been replicated.

Your next answer will be private, to share this information safely.

Also provide detailed steps to reproduce the issue and links to pages in the admin and on the frontend.

IMPORTANT: Please take a complete backup of the site to avoid data loss. I may need to activate/deactivate plugins also.

See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

P.S.: If you don't see the section for providing access information, do not write in the message box or the information may appear as public.

March 11, 2025 at 1:19 pm #16801907

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the access, I'll check soon and 'll get back to you as soon as I find something or have a solution.

March 12, 2025 at 8:38 am #16805640

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for you patience and cooperation. I was able to reproduce the issue after several retries.

And I guess the issue is somewhere else and perhaps a confusion is being created between USD and AUD (both have $ sign) at time of checkout. GBP works fine, even conversions between all these currencies is fine.

Only it happens when trying to switch between USD and AUD. AUD taking precedence, although for a brief moment USD price is shown too. And that's when logically USD was selected but prices were shown in AUD, the said issue happens with PayPal.

IMO, problem is even before that.

I'm working more on it and 'll try to reproduce in a fresh site as well. Please keep your staging site as it is. I've deactivated several plugins and have switched themes. I need to recreate the same setup, so I request to left the staging in current state. I'll update you accordingly.

March 12, 2025 at 1:08 pm #16807197

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation, I am working on this and 'll get back to you as soon as I find something or have a solution.

March 13, 2025 at 10:27 am #16811097

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

I tried to reproduce the issue in another site where it worked fine because of the plugins difference. So I then updated WPML, String Translation and WCML plugins (as recommended earlier) in your staging site, deactivated the plugins and reactivated to clear any plugin cache, as well as, cleared browser caches.

After that when I rechecked for the issue, it is working just fine in your staging site. At the moment only required plugins are active with a standard WordPress theme like 2021.

I've attached a few images for reference. You can see that regardless of my location, the prices are shown based on the "Site Language" (as per multicurrency settings). And same is reflected in the PayPal popup.

mc.jpg
us-paypal.jpg
plugins.jpg
en-gb-paypal.jpg
en-au-paypal.jpg