-
-
Save pramodjodhani/dcd982be8c3540132f49fd9f54a40559 to your computer and use it in GitHub Desktop.
Add LATAM currencies to Gravity Forms
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 | |
add_filter( 'gform_currencies', 'gf_mcg_add_latam_currencies' ); | |
function gf_mcg_add_latam_currencies( $currencies ) { | |
// Add Argentine peso Argentina $. | |
$currencies['ARS'] = array( | |
'name' => __( 'Argentine Peso', 'gravityforms' ), | |
'symbol_left' => '$', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => '.', | |
'decimal_separator' => ',', | |
'code' => 'ARS', | |
'decimals' => 2, | |
); | |
// add Belize dollar. | |
$currencies['BZD'] = array( | |
'name' => __( 'Belize Dollar', 'gravityforms' ), | |
'symbol_left' => '$', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => ',', | |
'decimal_separator' => '.', | |
'code' => 'BZD', | |
'decimals' => 2, | |
); | |
// Bolivian boliviano. | |
$currencies['BOB'] = array( | |
'name' => __( 'Bolivian Boliviano', 'gravityforms' ), | |
'symbol_left' => 'Bs.', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => '.', | |
'decimal_separator' => ',', | |
'code' => 'BOB', | |
'decimals' => 2, | |
); | |
// Chilean peso Chile. | |
$currencies['CLP'] = array( | |
'name' => __( 'Chilean Peso', 'gravityforms' ), | |
'symbol_left' => 'Ch$', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => '.', | |
'decimal_separator' => ',', | |
'code' => 'CLP', | |
'decimals' => 2, | |
); | |
// Colombian peso Colombia. | |
$currencies['COP'] = array( | |
'name' => __( 'Colombian Peso', 'gravityforms' ), | |
'symbol_left' => 'Col$', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => '.', | |
'decimal_separator' => ',', | |
'code' => 'COP', | |
'decimals' => 2, | |
); | |
// Costa Rican colón. | |
$currencies['CRC'] = array( | |
'name' => __( 'Costa Rican Colón', 'gravityforms' ), | |
'symbol_left' => '₡', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => '.', | |
'decimal_separator' => ',', | |
'code' => 'CRC', | |
'decimals' => 2, | |
); | |
// Dominican peso. | |
$currencies['DOP'] = array( | |
'name' => __( 'Dominican Peso', 'gravityforms' ), | |
'symbol_left' => 'RD$', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => ',', | |
'decimal_separator' => '.', | |
'code' => 'DOP', | |
'decimals' => 2, | |
); | |
// Guatemalan quetzal. | |
$currencies['GTQ'] = array( | |
'name' => __( 'Guatemalan Quetzal', 'gravityforms' ), | |
'symbol_left' => 'Q', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => ',', | |
'decimal_separator' => '.', | |
'code' => 'GTQ', | |
'decimals' => 2, | |
); | |
// Honduran lempira. | |
$currencies['HNL'] = array( | |
'name' => __( 'Honduran Lempira', 'gravityforms' ), | |
'symbol_left' => 'L', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => ',', | |
'decimal_separator' => '.', | |
'code' => 'HNL', | |
'decimals' => 2, | |
); | |
// Nicaraguan córdoba. | |
$currencies['NIO'] = array( | |
'name' => __( 'Nicaraguan Córdoba', 'gravityforms' ), | |
'symbol_left' => 'C$', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => ',', | |
'decimal_separator' => '.', | |
'code' => 'NIO', | |
'decimals' => 2, | |
); | |
// Panamanian balboa. | |
$currencies['PAB'] = array( | |
'name' => __( 'Panamanian Balboa', 'gravityforms' ), | |
'symbol_left' => 'B/.', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => ',', | |
'decimal_separator' => '.', | |
'code' => 'PAB', | |
'decimals' => 2, | |
); | |
// Paraguayan guaraní. | |
$currencies['PYG'] = array( | |
'name' => __( 'Paraguayan Guaraní', 'gravityforms' ), | |
'symbol_left' => '₲', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => '.', | |
'decimal_separator' => ',', | |
'code' => 'PYG', | |
'decimals' => 2, | |
); | |
// Peruvian sol. | |
$currencies['PEN'] = array( | |
'name' => __( 'Peruvian Sol', 'gravityforms' ), | |
'symbol_left' => 'S/.', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => ',', | |
'decimal_separator' => '.', | |
'code' => 'PEN', | |
'decimals' => 2, | |
); | |
// Uruguayan peso. | |
$currencies['UYU'] = array( | |
'name' => __( 'Uruguayan Peso', 'gravityforms' ), | |
'symbol_left' => '$U', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => '.', | |
'decimal_separator' => ',', | |
'code' => 'UYU', | |
'decimals' => 2, | |
); | |
// Venezuelan bolívar. | |
$currencies['VEF'] = array( | |
'name' => __( 'Venezuelan Bolívar', 'gravityforms' ), | |
'symbol_left' => 'Bs.', | |
'symbol_right' => '', | |
'symbol_padding' => ' ', | |
'thousand_separator' => '.', | |
'decimal_separator' => ',', | |
'code' => 'VEF', | |
'decimals' => 2, | |
); | |
return $currencies; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment