Skip to content

Instantly share code, notes, and snippets.

@ibndawood
Created October 6, 2015 08:34
Show Gist options
  • Select an option

  • Save ibndawood/5a0b09bf00a25d5574a5 to your computer and use it in GitHub Desktop.

Select an option

Save ibndawood/5a0b09bf00a25d5574a5 to your computer and use it in GitHub Desktop.
Adding Azerbaijani Manat
add_filter( 'woocommerce_currencies', 'add_my_currency' );
function add_my_currency( $currencies ) {
$currencies['ANZ'] = __( 'Azerbaijani manat', 'woocommerce' );
return $currencies;
}
add_filter('woocommerce_currency_symbol', 'add_my_currency_symbol', 10, 2);
function add_my_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'ANZ': $currency_symbol = '₼'; break;
}
return $currency_symbol;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment