Created
August 17, 2016 16:24
-
-
Save lukecav/fd2ac46b13ef8fef97b5816bbbfb5d54 to your computer and use it in GitHub Desktop.
Change the currency symbol from '$' to 'USD' in Woocommerce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_currency_symbol', 'change_currency_symbol', 10, 2 ); | |
function change_currency_symbol( $symbols, $currency ) { | |
if ( 'USD' === $currency ) { | |
return 'USD'; | |
} | |
if ( 'EUR' === $currency ) { | |
return 'Euro'; | |
} | |
if ( 'AED' === $currency ) { | |
return 'AED'; | |
} | |
return $symbols; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks for the code, but the code shown everywhere, I want to show it an only single product page