Skip to content

Instantly share code, notes, and snippets.

@enrikberisha
Forked from lukecav/functions.php
Last active June 2, 2018 12:08
Show Gist options
  • Save enrikberisha/01c8766224ee6f76e0f5f725f436d855 to your computer and use it in GitHub Desktop.
Save enrikberisha/01c8766224ee6f76e0f5f725f436d855 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';
}
return $symbols;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment