Skip to content

Instantly share code, notes, and snippets.

@lukecav
Created August 17, 2016 16:24
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save lukecav/fd2ac46b13ef8fef97b5816bbbfb5d54 to your computer and use it in GitHub Desktop.
Save lukecav/fd2ac46b13ef8fef97b5816bbbfb5d54 to your computer and use it in GitHub Desktop.
Change the currency symbol from '$' to 'USD' in Woocommerce
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;
}
@hayskytech
Copy link

Thank you for the code...

@melinagomez
Copy link

Thank you! :)

@tondemut
Copy link

tondemut commented Oct 6, 2019

Thank you for the code!

@KaayesAbdullah
Copy link

thanks for the code, but the code shown everywhere, I want to show it an only single product page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment