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.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注