Image may be NSFW.
Clik here to view.A while back I had to deal with a requirement for an e-commerce website I was building for a customer that needed to have the currency code along with the currency symbol.
This was to avoid confusion with USD and AUD which both use the $ symbol.
To get past this we wanted to change the symbol to AUD$ instead of just $.
All the current work arounds that I could find would change it, but it would stuff up the payment as it went through to PayPal because it couldn’t find the proper currency code.
Here’s how to change the currency display symbol without changing the code or messing up the currency when it goes through to PayPal:
add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2); function change_existing_currency_symbol( $currency_symbol, $currency ) { switch( $currency ) { case 'AUD': $currency_symbol = 'AUD$'; break; } return $currency_symbol; } |
I originally posted this solution in the WordPress.org forums against this post because the OP had a very similar requirement. Hope this helps someone out there with a similar issue!