Skip to content

Instantly share code, notes, and snippets.

@pramodjodhani
Created July 23, 2025 17:20
Show Gist options
  • Save pramodjodhani/e3867b74d2a92885cfb95a20856970db to your computer and use it in GitHub Desktop.
Save pramodjodhani/e3867b74d2a92885cfb95a20856970db to your computer and use it in GitHub Desktop.

Revisions

  1. pramodjodhani created this gist Jul 23, 2025.
    23 changes: 23 additions & 0 deletions mcg-add-aed-currency-to-gf.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    <?php
    /**
    * Add UAE Dirham (AED) currency to Gravity Forms.
    *
    * @param array $currencies The current currencies registered in Gravity Forms.
    * @return array List of supported currencies with AED added.
    */
    function add_aed_currency_to_gf( $currencies ) {
    $currencies['AED'] = array(
    'name' => 'United Arab Emirates Dirham',
    'symbol_left' => 'د.إ',
    'symbol_right' => '',
    'symbol_padding' => ' ',
    'thousand_separator' => ',',
    'decimal_separator' => '.',
    'decimals' => 2,
    'code' => 'AED',
    );

    return $currencies;
    }
    add_filter( 'gform_currencies', 'add_aed_currency_to_gf' );