Skip to content
Advertisement

How to change Woocommerce currency symbol

my Woocommerce is having toubles to send feeds to Amazon SellerCentral. Amazon requires EUR as woocommerce_currency value but Woocommerce returns €. How can I change this value? Thanks a lot.

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

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

Advertisement

Answer

You would able to make your custom currency, which one will show on the backend currency selection drop down.

add_filter( 'woocommerce_currencies', 'add_cw_currency' );
function add_cw_currency( $cw_currency ) {
     $cw_currency['CLOUDWAYS'] = __( 'CLOUDWAYS CURRECY', 'woocommerce' );
     return $cw_currency;
}

add_filter('woocommerce_currency_symbol', 'add_cw_currency_symbol', 10, 2);
function add_cw_currency_symbol( $custom_currency_symbol, $custom_currency ) {
     switch( $custom_currency ) {
         case 'CLOUDWAYS': $custom_currency_symbol = 'CW$'; break;
     }
     return $custom_currency_symbol;
}

There are little explanation with following link, hope that one could help you. https://www.cloudways.com/blog/add-custom-currency-symbol-in-woocommerce/

thanks !

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement