Filter
rpress_gateway_admin_label
On this page
Filters the admin label of a payment gateway.
Runs in rpress_get_gateway_admin_label. The label comes from the registered gateway, or the gateway ID if it is unknown. For the manual gateway on an order screen with a zero amount, the label is changed to Test Payment before the filter runs.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$label | string | Admin label for the gateway. |
$gateway | string | Gateway ID. |
Return value#
string. The admin label.
Example#
function my_gateway_admin_label( $label, $gateway ) {
if ( 'cash_on_delivery' === $gateway ) {
return __( 'Cash (rider collects)', 'my-plugin' );
}
return $label;
}
add_filter( 'rpress_gateway_admin_label', 'my_gateway_admin_label', 10, 2 );
Source#
Applied in:
includes/gateways/functions.php(line 131), inrpress_get_gateway_admin_label()
See also#
Was this page helpful?
