gform_currency

gform_currency

DescriptionUsageParametersExamplesPlacementSource Code

Description
Use this filter to override the currency configured on the Forms > Settings page. It will affect all forms.
Usage
1add_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).
1234add_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
1apply_filters( 'gform_currency', $currency )
This filter is located in GFCommon::get_currency() in common.php.

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註