Skip Navigation

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

Problem:
The client needed WooCommerce Multilingual & Multicurrency, but enabling it along with WPML String Translation resulted in a fatal error on the page.
Solution:
We found the culprit of the issue by enabling debug mode. If you encounter a fatal error similar to the one below:

[08-Mar-2024 18:20:23 UTC] PHP Fatal error:  Uncaught TypeError: Unsupported operand types: string * string in wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php:387

We suggest going to WooCommerce > WooCommerce Multilingual > Multicurrency and setting up an exchange rate for the currency that is causing the issue, such as the 'Polish złoty'.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If the problem persists, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, 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.

This topic contains 8 replies, has 2 voices.

Last updated by dariuszD-5 1 year, 3 months ago.

Assisted by: Mateus Getulio.

Author Posts
March 7, 2024 at 1:05 pm #15384459

dariuszD-5

I need WooCommerce Multilingual & Multicurrency, but it needs WPML String Translation. When I enable both, there is a conflict and the page only shows a fatal error. Can you do anything about it?

March 7, 2024 at 5:18 pm #15386172

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Based on your description of the error, some closer debugging is needed.

I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link

Please, let me know if you need any additional details. Have a nice day.

March 8, 2024 at 9:35 am #15388057

dariuszD-5

Please let me know what happened there.

March 8, 2024 at 12:42 pm #15389288

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Thank you for sharing the access.

I checked your site and I see that both String Translation and WooCommerce Multilingual are enabled and working on your site. Did you manage to fix the issue on your end?

I tried replicating it but so far I couldn't.

If there's still an issue, please share the steps to reproduce it and I'll debug it further.

Thank you, please let us know.
Mateus

March 8, 2024 at 1:04 pm #15389356

dariuszD-5

Yes, the problem still exists. Switch the website to Polish.

March 8, 2024 at 5:00 pm #15390343

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Thank you for sharing that information. I debugged this but so far I wasn't able to find a solution.

I'd like to ask permission to make a copy/staging version of your site where I can debug this closely without affecting the live site.

I'll make sure to delete this copy as soon as we get this issue fixed.

I'm afraid of debugging directly on the live site and cause issues to your visitors. Also, it is important to test a different setup as part of the troubleshooting.

Thank you, please let us know.
Mateus

March 8, 2024 at 5:23 pm #15390384

dariuszD-5

Of course, make a copy please!

March 8, 2024 at 7:58 pm #15390658

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

I checked it and upon enabling the debug mode I saw this error:

[08-Mar-2024 18:20:23 UTC] PHP Fatal error:  Uncaught TypeError: Unsupported operand types: string * string in wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php:387
Stack trace:
#0 wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php(345): WCML_Multi_Currency_Prices->calculate_exchange_rate_price()

I was able to fix in it my copy by going to WooCommerce > WooCommerce Multilingual > Multicurrency and setting up an exchange rate for the 'Polish złoty' currency.

Can you give it a try and tell us how that goes?

Best,
Mateus

March 11, 2024 at 3:05 pm #15396208

dariuszD-5

it's working now, thank you for your help!