Filter
rpress_payment_gateway
On this page
Filters the gateway key of a payment.
Applied when the gateway property of an RPRESS_Payment is read. The filter runs on every read of the property, not only when the payment is loaded.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$gateway | string | The gateway key stored on the payment. |
$payment_id | int | ID of the payment. |
$payment | RPRESS_Payment | The payment object. |
Return value#
string. The gateway key to return.
Example#
function my_payment_gateway( $gateway, $payment_id, $payment ) {
return $gateway;
}
add_filter( 'rpress_payment_gateway', 'my_payment_gateway', 10, 3 );
Source#
Applied in:
includes/payments/class-rpress-payment.php(line 2220), inRPRESS_Payment::get_gateway()
Was this page helpful?
