Skip to content

Instantly share code, notes, and snippets.

@remcotolsma
Created October 9, 2019 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remcotolsma/c67732103732e4a6894a11f6e87f8dbe to your computer and use it in GitHub Desktop.
Save remcotolsma/c67732103732e4a6894a11f6e87f8dbe to your computer and use it in GitHub Desktop.
Update Gravity Forms currency EUR.
<?php
/**
* Update Gravity Forms currency EUR.
*
* @link https://www.pronamic.nl/2012/04/gravity-forms-euro-teken-voor-bedrag/
* @link https://docs.gravityforms.com/gform_currencies/#1-update-euro
*/
\add_filter(
'gform_currencies',
/**
* Gravity Forms currencies filter.
*
* @link https://github.com/wp-premium/gravityforms/blob/2.4.9/currency.php#L116-L146
* @param array $currencies Gravity Forms currencies.
* @return array
*/
function( $currencies ) {
$currencies['EUR'] = array(
'name' => __( 'Euro', 'text-domain' ),
'symbol_left' => '€',
'symbol_right' => '',
'symbol_padding' => ' ',
'thousand_separator' => '.',
'decimal_separator' => ',',
'decimals' => 2,
);
return $currencies;
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment