Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shameemreza/dec5e20d8faa805833c51393f0ad954e to your computer and use it in GitHub Desktop.
Save shameemreza/dec5e20d8faa805833c51393f0ad954e to your computer and use it in GitHub Desktop.
Change the currency symbol in WooCommerce
function filter_woocommerce_currency_symbol( $currency_symbol, $currency ) {
// Compare
switch( $currency ) {
case 'GBP': $currency_symbol = '€';
break;
}
return $currency_symbol;
}
add_filter( 'woocommerce_currency_symbol', 'filter_woocommerce_currency_symbol', 1, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment