Skip to content

Instantly share code, notes, and snippets.

@goodmuyis
Forked from ideadude/pmpro_xof_currency_format.php
Last active February 16, 2019 20:21
Show Gist options
  • Save goodmuyis/c1f28c3d622f5a2f923106ed928eed31 to your computer and use it in GitHub Desktop.
Save goodmuyis/c1f28c3d622f5a2f923106ed928eed31 to your computer and use it in GitHub Desktop.
Add Nigerian Naira currency to Paid Memberships Pro
<?php
/**
* Add Nigerian Naira currency to Paid Memberships Pro
* Add this code into a custom plugin. https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function pmpro_ngn_currency_format( $pmpro_currencies ) {
$pmpro_currencies['XOF'] = array(
'name' => __( 'Nigerian Naira', 'paid-memberships-pro' ),
'decimals' => '2',
'thousands_separator' => ',',
'decimal_separator' => '.',
'symbol' => '₦',
'position' => 'right',
);
return $pmpro_currencies;
}
add_filter( 'pmpro_currencies', 'pmpro_ngn_currency_format' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment