Skip to content

Instantly share code, notes, and snippets.

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