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.

This topic contains 4 replies, has 2 voices.

Last updated by Dražen 1 year, 4 months ago.

Author Posts
August 30, 2023 at 3:01 am #14309721

shaya

if I want to change a currency symbol from '$' to the MXN etc,. can I use the snippet like that??

/**
* Change a currency symbol
*/
add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);

function change_existing_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'MXN': $currency_symbol = 'MXN'; break;
case 'HKD': $currency_symbol = 'HKD'; break;

}
return $currency_symbol;
}

or like that??

add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);

function change_existing_currency_symbol( $currency_symbols) {

$currency_symbols['MXN'] = 'MXN';
$currency_symbols['HKD'] = 'HKD';

return $currency_symbols;
}

can I base it on the list in this link?

https://stackoverflow.com/questions/71849168/how-to-change-woocommerce-currency-symbol-in-wordpress-dashboard

tnx
shaya

August 30, 2023 at 7:08 am #14310487

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello Shaya,

we can not help with custom coding and/or issues not related to WPML, best I can do is advise you to follow default WooCommerce docs and if need further help hire a developer / WPML contractor:

- https://woocommerce.com/document/change-a-currency-symbol/
- https://wpml.org/contractors/

Regards,
Drazen

August 30, 2023 at 7:14 am #14310583

shaya

what is not related??
How I change your currency symbols !!!!!
not pass it without understanding and checking..

see in the screenshot is your system ..
is should show MXD not '$' ..

1234.png
August 30, 2023 at 2:26 pm #14314607

shaya

someone??

August 31, 2023 at 7:46 am #14317849

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

hello,

actually, currency is coming from WooCommerce not WPML, it is the same without WPML. So as said you need to follow shared WooCommerce docs to change it. Image attached.

Regards,
Drazen

Screenshot_6.jpg

The topic ‘[Closed] change the mxn and others currency simblue wpml’ is closed to new replies.