Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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;
}
@sufyan-sheikh

This comment has been minimized.

Copy link

@sufyan-sheikh sufyan-sheikh commented Jun 30, 2018

Thank you for the code...

@melinagomez

This comment has been minimized.

Copy link

@melinagomez melinagomez commented Sep 5, 2019

Thank you! :)

@tondemut

This comment has been minimized.

Copy link

@tondemut tondemut commented Oct 6, 2019

Thank you for the code!

@KaayesAbdullah

This comment has been minimized.

Copy link

@KaayesAbdullah KaayesAbdullah commented Aug 3, 2020

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
You can’t perform that action at this time.