This thread is resolved. Here is a description of the problem and solution.
Problem:
The client wants to add a currency code after the price in WooCommerce, such as USD or EUR, and modify the language selector to match the style of the currency selector.
Solution:
To display the currency code after the price, you can use the
woocommerce_price_format
filter. Here is an example of how you can customize it:
add_filter('woocommerce_price_format', 'custom_woocommerce_price_format', 10, 2);<br />function custom_woocommerce_price_format($format, $currency) {<br /> return '%1$s %2$s ' . $currency; // Shows the currency code after the price<br />}
For more details, you can refer to these documentation links:
- https://gist.github.com/kittenlane/09d48c9be015bd2cfcb8
- https://wp-kama.com/plugin/woocommerce/hook/woocommerce_price_format
Since this customization is outside our support scope as it involves WooCommerce settings not directly related to WPML, we recommend consulting professional developers if further customization is needed. You can find qualified developers at https://wpml.org/contractors/.
Please note that this solution might be irrelevant if it's outdated or not applicable 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 the issue persists, please open a new support ticket for further assistance.
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 9 replies, has 2 voices.
Last updated by 1 month, 3 weeks ago.
Assisted by: Bruno Kos.