Skip to content
Docs
Get RestroPress

Filter

rpress_gateway_checkout_label_{$gateway_id}

Updated
On this page

Filters the checkout label of a payment gateway in the gateway selector.

Runs in rpress_payment_mode_select() for each enabled gateway while the radio options are built. The dynamic part is the gateway ID. The value starts as the checkout_label registered for that gateway. It is escaped on output.

Parameters#

ParameterTypeDescription
$labelstringThe checkout label registered for the gateway.

Return value#

string. The label shown next to the gateway option.

Example#

function my_manual_gateway_label( $label ) {
	return __( 'Pay at the counter', 'my-textdomain' );
}
add_filter( 'rpress_gateway_checkout_label_manual', 'my_manual_gateway_label', 10, 1 );

Notes#

The generic rpress_gateway_checkout_label filter applies to the label returned by rpress_get_gateway_checkout_label(), a different code path.

Source#

Applied in:

  • includes/checkout/template.php (line 841), in rpress_payment_mode_select()

See also#

Was this page helpful?