Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adjust currency for Paid Memberships Pro
<?php
/**
* Adjust Euros for Paid Memberships Pro. Add correct thousands and decimal separator. (i.e. 1.500,99)
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_eu_format( $pmpro_currencies ) {
$pmpro_currencies['EUR'] = array(
'decimals' => '2',
'thousands_separator' => '.',
'decimal_separator' => ',',
'name' => __('Euros (&euro;)', 'paid-memberships-pro' ),
'symbol' => '&euro;',
'position' => apply_filters("pmpro_euro_position", pmpro_euro_position_from_locale())
);
return $pmpro_currencies;
}
add_filter( 'pmpro_currencies', 'my_pmpro_eu_format' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment