Skip Navigation

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: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 0 voices.

Last updated by Waqas Bin Hasan 2 weeks, 3 days ago.

Assisted by: Waqas Bin Hasan.

Author Posts
February 19, 2025 at 1:51 pm #16724936

severinP

<b>Background of the issue: </b>
I updated WPML from 4.7.0 to 4.7.1 with some code that handles prices. Here is the code I use:

global $woocommerce_wpml;
$woocommerce_wpml->get_multi_currency()->prices->unconvert_price_amount($minPrice);

<b>Symptoms: </b>
I expected to see no error, but instead, I got: 'No definition available to provision typeless parameter $wp_locale at position 1 in WCML_Exchange_Rates::__construct() declared in WCML_Exchange_Rates'.

<b>Questions: </b>
How can I resolve the error related to the typeless parameter $wp_locale in WCML_Exchange_Rates?

After more debugging I can see this is due to `remove_action( 'wpml_loaded', 'wcml_loader' );`

Because woocommerce multilingual is required in version 5.4.0 in the new release, but I only have version 5.3.9 as it's the latest one published
https://wordpress.org/plugins/woocommerce-multilingual/

February 20, 2025 at 9:17 am #16728325

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting the support.

You can try one of the following methods to update WCML to latest version:

A) Go to Plugins -> Add New -> Commercial and click "Check for Updates". Then you can find the newer versions from the table below that button and update accordingly.

B) Or you can download from https://wpml.org/account/downloads/ and can upload using Plugins -> Add New -> Upload.

Please let me know if updating WCML (and other WPML plugins as needed) helps fixing the said problem.

If problem still continues to appear (after updating everything), please also provide the debug information of your website for an overview of your setup. See https://wpml.org/faq/provide-debug-information-faster-support/ for more information.

I've enabled the debug information section for your next reply.

Additionally you can also take a look at https://wpml.org/faq/checklist-before-opening-a-ticket-in-wpml-support/ and cross-check for a few initial fixes.

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

Regards.

The topic ‘[Closed] make error on WCML_Exchange_Rates’ is closed to new replies.