Wordpress

How to change currency symbol woocommerce.

Simple way to change your current currency symbol in woocommerce code. Use below code in the function.php file to change symbol befor the actual values of price.

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;
case ‘USD’: $currency_symbol = ‘USD ‘; break;
case ‘AUD’: $currency_symbol = ‘AUD ‘; break;
}
return $currency_symbol;
}

Want results like these for your business?

Talk to Aditya Infotech about SEO, Google Ads and websites that grow your business.

Get a free consultation

More from our blog