Created
May 22, 2015 15:13
-
-
Save WillBrubaker/305b73925005e26968b7 to your computer and use it in GitHub Desktop.
Add Mongolian currency and symbol to WooCommerce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_currencies', 'wooninja_add_currencies' ); | |
function wooninja_add_currencies( $currencies ) { | |
$currencies['MNT'] = 'Mongolian Tughrik'; | |
return $currencies; | |
} | |
add_filter( 'woocommerce_currency_symbol', 'wooninja_currency_symbol', 10, 2 ); | |
function wooninja_currency_symbol( $currency_symbol, $currency ) { | |
if ( 'MNT' === $currency ) { | |
$currency_symbol = '₮'; | |
} | |
return $currency_symbol; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment