Filter
rpress_settings_gateways
On this page
Filters the settings registered for the Payment Gateways tab.
Runs while RestroPress builds its registered settings. The array is keyed by section ID (main), and each section is an array of setting ID => field definition with keys such as id, name, desc, type and std. Add, remove or change fields to extend the tab.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$settings | array | Array of section ID => array of setting ID => field definition. |
Return value#
array. The section => settings array.
Example#
function my_add_gateways_setting( $settings ) {
$settings['main']['my_extension_option'] = array(
'id' => 'my_extension_option',
'name' => esc_html__( 'My option', 'my-plugin' ),
'desc' => esc_html__( 'Explain what the option does.', 'my-plugin' ),
'type' => 'text',
);
return $settings;
}
add_filter( 'rpress_settings_gateways', 'my_add_gateways_setting', 10, 1 );
Source#
Applied in:
includes/admin/settings/register-settings.php(line 1074), inrpress_get_registered_settings()
See also#
Was this page helpful?
