<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' );`
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.
The topic ‘[Closed] make error on WCML_Exchange_Rates’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.