gform_currency

Description

Use this filter to override the currency configured on the Forms > Settings page. It will affect all forms.

Usage

add_filter( 'gform_currency', 'your_function_name' );

Parameters

  • $currency string

    The currency code to be filtered.

Examples

This example forces the current currency to USD (US dollars).

add_filter( 'gform_currency', 'usd_currency' );
function usd_currency( $currency ) {
return 'USD';
}

Placement

This code should be placed in the functions.php file of your active theme.

Source Code

apply_filters( 'gform_currency', $currency )

This filter is located in GFCommon::get_currency() in common.php.