Created
September 18, 2024 16:38
-
-
Save pramodjodhani/cf94d428f52adbd33aff2d2cbf699810 to your computer and use it in GitHub Desktop.
Add TRY (Turkish Lira) currency to Gravity Forms.
This file contains hidden or 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
| /** | |
| * Add TRY (Turkish Lira) currency to Gravity Forms. | |
| * | |
| * @param array $currencies The current currencies registered in Gravity Forms. | |
| * | |
| * @return array List of supported currencies. | |
| */ | |
| function add_try_currency( $currencies ) { | |
| $currencies['TRY'] = array( | |
| 'name' => 'Turkish Lira', | |
| 'code' => 'TRY', | |
| 'symbol_left' => '₺', | |
| 'symbol_right' => '', | |
| 'symbol_padding' => ' ', | |
| 'thousand_separator' => ',', | |
| 'decimal_separator' => '.', | |
| 'decimals' => 2, | |
| ); | |
| return $currencies; | |
| } | |
| add_filter( 'gform_currencies', 'add_try_currency' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment