Filter
rpress_gateway_checkout_label
On this page
Filters the checkout label of a payment gateway.
Runs in rpress_get_gateway_checkout_label. The label comes from the registered gateway, or the gateway ID if it is unknown. The manual gateway always uses Test Payment before the filter runs.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$label | string | Checkout label for the gateway. |
$gateway | string | Gateway ID. |
Return value#
string. The checkout label.
Example#
function my_gateway_checkout_label( $label, $gateway ) {
if ( 'paypal' === $gateway ) {
return __( 'PayPal or card', 'my-plugin' );
}
return $label;
}
add_filter( 'rpress_gateway_checkout_label', 'my_gateway_checkout_label', 10, 2 );
Source#
Applied in:
includes/gateways/functions.php(line 146), inrpress_get_gateway_checkout_label()
See also#
Was this page helpful?
