Skip to content

Instantly share code, notes, and snippets.

@ikourfaln
Created April 5, 2018 10:47
Show Gist options
  • Save ikourfaln/9c75b0278b6de750164e14979d72fa75 to your computer and use it in GitHub Desktop.
Save ikourfaln/9c75b0278b6de750164e14979d72fa75 to your computer and use it in GitHub Desktop.
WooCommerce: Change a currency symbol from 'د.م.' to 'Dhs'
add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);
function change_existing_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'MAD': $currency_symbol = 'Dhs'; break;
}
return $currency_symbol;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment