Last active
August 29, 2015 14:22
-
-
Save chrdesigner/72ae700872738fac0da3 to your computer and use it in GitHub Desktop.
Add symbol United Arab Emirates Dirham
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
| <?php | |
| // Add symbol United Arab Emirates Dirham | |
| add_filter( 'woocommerce_currencies', 'add_custom_currency' ); | |
| function add_custom_currency( $currencies ) { | |
| $currencies['AED'] = __( 'United Arab Emirates Dirham', 'woocommerce' ); | |
| return $currencies; | |
| } | |
| add_filter('woocommerce_currency_symbol', 'add_custom_currency_symbol', 10, 2); | |
| function add_custom_currency_symbol( $currency_symbol, $currency ) { | |
| switch( $currency ) { | |
| case 'AED': $currency_symbol = 'AED '; break; | |
| } | |
| return $currency_symbol; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment