How To: Replace or modify existing currency symbols in Woocommerce

This code snippet will replace any currency symbol in Woocommerce to any text or symbol that you choose. In the example below we will replace the British Pound symbol with the text Queens Pounds

Simply add the code to your theme’s functions.php file.  Just replace GBP with 3-letter international code for your currency and also replace the text Queens Pounds with your own text or symbol. Avoid adding custom code directly to your parent theme’s functions.php file as this will be deleted when you update the theme.

/**
* Modify existing currency symbol in Woocommerce
*/

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

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

This code snippet should work with any theme.

Did it work for you? Please let us know in comments below.