Skip to content
Docs
Get RestroPress

Filter

rpress_paypal_settings

Updated
On this page

Filters the PayPal Standard settings fields shown in the gateway settings.

Runs in rpress_register_paypal_gateway_settings after the built-in PayPal Standard fields are defined. The array is keyed by field ID, and each field is an array with keys such as id, name, desc and type. The result is added to the settings for the paypal gateway subsection.

Parameters#

ParameterTypeDescription
$paypal_settingsarrayPayPal setting fields keyed by field ID.

Return value#

array. The PayPal setting fields.

Example#

function my_paypal_settings( $paypal_settings ) {
	$paypal_settings['my_paypal_note'] = array(
		'id'   => 'my_paypal_note',
		'name' => __( 'Order note', 'my-plugin' ),
		'desc' => __( 'Text added to PayPal orders.', 'my-plugin' ),
		'type' => 'text',
		'size' => 'regular',
	);
	return $paypal_settings;
}
add_filter( 'rpress_paypal_settings', 'my_paypal_settings', 10, 1 );

Source#

Applied in:

  • includes/gateways/paypal-standard.php (line 86), in rpress_register_paypal_gateway_settings()

See also#

Was this page helpful?