Description

The wpforms_currencies filters currency options available in WPForms Settings (listed under WPForms » Settings » Payments, in the Currency dropdown field).

Parameters

$currencies
(array) (Required) Supported currency options, including the details for each type of currency.

Source

wpforms/includes/functions/payments.php

More Information

The wpforms_currencies filter provides a list of supported currencies.

Since version 1.2.6, WPForms has supported multiple currencies for the Currency dropdown field.

Examples

Please note, customizing the decimals positioning of any currency could break the currency on any of the WPForms payment addon. The payment process would ignore the decimal values.

/**
 * Filters a list of supported currencies.
 * 
 * @link   https://wpforms.com/developers/wpforms_currencies/
 *
 * @param  array $currencies Supported currency options, including the details for each type of currency.
 *
 * @return array
 */
function wpf_dev_currencies( $currencies ) {

	$currencies = array(
	'USD' => array(
    	'name'                => esc_html__( 'U.S. Dollar', 'wpforms' ),
		'symbol'              => '$',
		'symbol_pos'          => 'left',
		'thousands_separator' => ',',
		'decimal_separator'   => '.',
		'decimals'            => 2,
		),
	);    
	return $currencies;

}

add_filter( 'wpforms_currencies', 'wpf_dev_currencies', 10, 1 );

Reference Articles

How to Create a New Currency Symbol for WPForms