Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 5 replies, has 0 voices.

Last updated by Andreas W. 3 days, 23 hours ago.

Assisted by: Andreas W..

Author Posts
September 6, 2025 at 7:28 am #17380764

nassimy

Background of the issue:
I'm using the MasterCard gateway plugin, and it works fine. However, when I use the multicurrency feature with WPML, some Arab countries like Saudi Arabia cause an error during checkout. If I deactivate WPML or the multicurrency feature, the gateway portal works fine. The issue can be seen on this page: hidden link.

Symptoms:
When selecting some Arab countries in the checkout, I get an error: "Error: "Object of class NyholmPsr7Request could not be converted to string"".

Questions:
Why does the error occur when selecting certain countries in the checkout with multicurrency enabled?
How can I resolve the error to ensure all countries work during checkout?

September 6, 2025 at 9:13 am #17380850

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

The main question is whether this is really an issue with our WooCommerce Addon, or if you would have the same issue when running WooCommerce without WPML and using an Arab country like Saudi Arabia as the site's default language and default currency.

Also, note that Mastercard is not available in some countries, like for example in Iran.

Could you install your "MasterCard Gateway Plugin" on the following sandbox, so that we can run some tests?

One-Click-Login:
hidden link

Please also set up WPML and WCML and use the same language and currency settings as used on your site, and drop me a comment once you are done with this task.

It would also be very helpful if you could provide us with WPML debugging information.
More information here:
https://wpml.org/de/faq/provide-debug-information-faster-support/

Best regards
Andreas

September 6, 2025 at 2:04 pm #17381055

nassimy

Hello,

I have just installed "MasterCard Gateway Plugin" and added the testing setup on to it on sandbox and set up WPML and WCML using the same language and currency settings as used on my site.

I added the WPML debug info you required.

Thank you.

September 6, 2025 at 2:16 pm #17381062

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

On my test site, I do not have an issue with reaching the payment gateway, but it looks like this gateway does not accept any currency other than USD. No matter which currency I have set on the checkout, the payment gateway will only use USD.

Can you please confirm if you can recreate the issue on this test site?

In case not, then the issue might be related to a specific setting or a third plugin. I can offer, in this case, to take a closer look at your site as admin.

I would like to request temporary access (wp-admin and FTP) to the website to investigate the issue further.

You can find the required fields below the comments section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.

IMPORTANT
Please be sure to back up your website and database before granting us access.
If you can't see the "wp-admin / FTP" fields, your post and website credentials will be set to "PUBLIC." DO NOT publish the data unless you see the required wp-admin / FTP fields.

I may need to install a plugin called "All In One WP Migration" to create a copy of the website so I can investigate the issue further.

However, I would also be very grateful if you could provide a staging site or a copy of the website from your server for this purpose.

If you have any questions about creating such a staging site, you can consult your hosting provider. Please note that WPML must also be registered on this staging site at https://wpml.org/account/websites/.

If you are unable to provide such a copy of the website for testing, please let me know on this ticket.

The private reply form looks like this:
hidden link

Click "I still need assistance" the next time you reply.

Video:
hidden link

Please note that we are required to request this information individually on each ticket. We are not permitted to access any credentials that were not specifically submitted on this ticket using the private response form.

September 7, 2025 at 7:30 am #17381516

nassimy

Hello,

I have recreated the issue on the sand box you have sent to me by choosing Saudi Arabia as the country in the checkout and the error is the same as on my website as you can see in the image

If you still need the FTP access and admin please let me know

thank you

Screenshot 2025-09-07 at 10.19.36 AM.png
September 9, 2025 at 2:30 pm #17387513

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Thank you for following up!

You will get the same error when testing without WPML while using this currency in WooCommerce and setting WordPress to Arabic.

This appears not to be a WPML issue, and it needs to be reported to the support of "Mastercard Gateway".