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 2 replies, has 2 voices.

Last updated by Radu 2 months ago.

Assigned support staff: Radu.

Author Posts
August 14, 2019 at 3:20 pm #4396317

williamk-20

Hi, why don't WPML Woocommerce Multilingual correct the currency symbol ? As all currency symbol showing $, which is totally wrong. Secondly, when I change the currency, the value change but the price symbol on the woocommerce still showing $ even though I used the custom code below.

add_filter( 'woocommerce_currencies', 'add_my_currency' );

function add_my_currency( $currencies ) {
$currencies['EUR'] = __( 'Euro', 'woocommerce' );
return $currencies;
}

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

function add_my_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'EUR': $currency_symbol = '€'; break;
}
return $currency_symbol;
}

August 14, 2019 at 3:54 pm #4396531

williamk-20

Hi, this issue is resolved, because there was a conflict with another currency switcher, after I disable it then it works. But the currency value response for shipping price using the AJAX is still showing the $ rather than the €

Also is there a way to make the currency change request as part of the url such as domain.com/es/euro/abc123
and not as parameter query request /?wcmlc=EUR because this will disable the WP Super Cache functionality.

August 15, 2019 at 11:28 am #4400477

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey William,

Thank you for reaching out the WPML support!

You did a good job about finding out that one of the plugins was causing the issue about the currency symbol. Well done!

Now, regarding the currency change, I'm afraid that you cannot change the way it works. I understand that you'd like to have as part of the URL but this kind of change would require the change of a big part of the plugin logic. For now, this is the only way that the currency change works.

Thanks,
Radu

The topic ‘[Closed] Correct currency symbol’ is closed to new replies.