Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Change EU Danish Krone currency format
<?php // do not include in Customizations plugin if copying and pasting
* This code gist illustrates a way to customize the format of how your currency displays.
* In this example, we will change the PMPro Danish Krone currency
* from DKK 1,495.00
* to DKK 1 495,00
* Adjust this code gist to suit your needs for currency.
* Currency information can be found in this core plugin file `/paid-memberships-pro/includes/currencies.php`
* Add this code below to your PMPro Customizations Plugin
* -
* pmpro_eu_dkk_format This function changes the values of a specific keys for a currency in the `$pmpro_currencies` array.
* @param array $pmpro_currencies The currency array created by PMPro
* @return array The adjusted currency array
function pmpro_eu_dkk_format( $pmpro_currencies ) {
$pmpro_currencies['DKK'] = array(
'name' => __( 'Danish Krone', 'paid-memberships-pro' ),
'decimals' => '2',
'thousands_separator' => '&nbsp;',
'decimal_separator' => ',',
'symbol' => 'DKK&nbsp;',
'position' => 'left',
return $pmpro_currencies;
add_filter( 'pmpro_currencies', 'pmpro_eu_dkk_format' );

This comment has been minimized.

Copy link

@laurenhagan0306 laurenhagan0306 commented Apr 7, 2021

This recipe is included in the blog post on "How to adjust your membership site’s default currency format." at Paid Memberships Pro here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment