Change a Currency Symbol
Replaces the symbol shown for a currency, for example "AU$" instead of "$" so international shoppers know which dollar you charge in.
Opens WPIDE on
Code
add_filter( 'woocommerce_currency_symbol', function ( $symbol, $currency ) {
$target = 'AUD'; // ISO currency code to change.
$new_symbol = 'AU$'; // Symbol to show.
return $currency === $target ? $new_symbol : $symbol;
}, 10, 2 );
Notes
Set $currency to the ISO code and $symbol to what should be displayed.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.