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.

Our next available supporter will start replying to tickets in about 3.28 hours from now. Thank you for your understanding.

This thread is resolved. Here is a description of the problem and solution.

Problem:
Display descripting currency name or currency code instead of currency symbols.
Use case: Currencies with same symbols leads to confusion eg, Norwegian Kroner, Swedish Kroner, Kr as a currency symbol

Solution:
Use the code in the theme function.php file

 // Change the currency symbol for swedish and norway kroner
function sww_change_wc_currency_symbol( $currency_symbol, $currency ) {
     switch( $currency ) {
          case 'SEK': $currency_symbol = 'SEK'; 
   break;
 case 'NOK': $currency_symbol = 'NOK'; 
   break;
      }
     return $currency_symbol;
}
add_filter('woocommerce_currency_symbol', 'sww_change_wc_currency_symbol', 10, 2);

Relevant Documentation:
https://jilt.com/blog/pricing-remove-currency-symbol/

This topic contains 3 replies, has 2 voices.

Last updated by kimL-10 1 month ago.

Assigned support staff: Raja Mohammed.

Author Posts
September 7, 2019 at 6:55 pm #4529771

kimL-10

Hello.

I am working on a store thats operating with NOK, SEK and DKK.
When customers buy in NOK and SEK it only says kr on the order confirmation.
But when they buy in DKK it says DKK.

Is it possible to show NOK, SEK and DKK?

Look at the screenshot.

September 9, 2019 at 11:17 am #4536525

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello there,

I will help you with the issue.

Please let me know the version of wpml used in your site.
I would like to request temporary access (wp-admin and FTP) to your test site to take a better look at the issue. Could you please indicate me how to replicate this behaviour?

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Kind regards
Raja

September 11, 2019 at 9:49 am #4552295

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for the information,

This is the expected behavior. Since the Norwegian and Swedish Kroner share the same currency symbol KR.

Alternatively, you can override the display of currency symbol with currency name by using the below code in your theme functions.php file

// Change the currency symbol for swedish and norway kroner
function sww_change_wc_currency_symbol( $currency_symbol, $currency ) {
     switch( $currency ) {
          case 'SEK': $currency_symbol = 'SEK'; 
   break;
 case 'NOK': $currency_symbol = 'NOK'; 
   break;
      }
     return $currency_symbol;
}
add_filter('woocommerce_currency_symbol', 'sww_change_wc_currency_symbol', 10, 2);

Reference : hidden link

I hope this helps you better

Kind regards
Raja

September 14, 2019 at 10:10 am #4572523

kimL-10

My issue is resolved now. Thank you!