Skip to content

Instantly share code, notes, and snippets.

@rynaldos-zz
Last active February 3, 2017 08:29
Show Gist options
  • Save rynaldos-zz/bb9d8e4170522c6e5116f54ec925bd09 to your computer and use it in GitHub Desktop.
Save rynaldos-zz/bb9d8e4170522c6e5116f54ec925bd09 to your computer and use it in GitHub Desktop.
[WooCommerce] Prepends the country code (US) to $ currency
add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);
function change_existing_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'USD': $currency_symbol = 'US$'; break;
}
return $currency_symbol;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment