Created
January 15, 2015 07:10
-
-
Save amdrew/dd84effe45ee11b8b5e7 to your computer and use it in GitHub Desktop.
AffiliateWP - Add Namibian Dollar
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 the Namibian Dollar as a currency | |
function affwp_custom_add_namibian_currency( $currencies ) { | |
$currencies['NAD'] = 'Namibian Dollar'; | |
return $currencies; | |
} | |
add_filter( 'affwp_currencies', 'affwp_custom_add_namibian_currency' ); | |
// add the currency symbol before the amount | |
function affwp_custom_namibian_currency_symbol( $formatted, $currency, $amount ) { | |
$formatted = 'N$' . $amount; | |
return $formatted; | |
} | |
add_filter( 'affwp_nad_currency_filter_before', 'affwp_custom_namibian_currency_symbol', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment