Skip to content

Instantly share code, notes, and snippets.

@farookibrahim
Last active October 28, 2015 07:51
Show Gist options
  • Select an option

  • Save farookibrahim/8feef19300a8b39086ed to your computer and use it in GitHub Desktop.

Select an option

Save farookibrahim/8feef19300a8b39086ed to your computer and use it in GitHub Desktop.
Add Currency Symbol for Give Plugin
add_filter( 'give_currencies', 'give_custom_currencies' );
function give_custom_currencies( $currencies ) {
$currencies['NGN'] = __( 'Nigerian Naira (₦)', 'bethlehem' );
return $currencies;
}
add_filter( 'give_currency_symbol', 'give_custom_currency_symbol', 10, 2 );
function give_custom_currency_symbol( $symbol, $currency ) {
if( $currency == 'NGN' ) {
$symbol = '₦';
}
return $symbol;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment