Last active
September 14, 2021 12:53
-
-
Save spivurno/0d772bae83bb216e89aa to your computer and use it in GitHub Desktop.
Gravity Wiz // Gravity Forms // Move Currency Symbol from the Left to the Right
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Graivty Wiz // Gravity Forms // Move Currency Symbol from the Right to the Left (i.e. "0,00 €" to "€ 0,00") | |
* http://gravitywiz.com/how-do-i-move-the-currency-symbol-from-the-right-to-the-left-for-gravity-forms/ | |
*/ | |
add_filter( 'gform_currencies', 'gw_modify_currencies' ); | |
function gw_modify_currencies( $currencies ) { | |
$currencies['EUR'] = array( | |
'name' => esc_html__( 'Euro', 'gravityforms' ), | |
'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
👉 This Gist has been migrated to the Gravity Wiz Snippet Library:
https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-currency-symbol-right-to-left.php