Skip to content
Docs
Get RestroPress

Filter

rpress_payment_gateway

Updated
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#

ParameterTypeDescription
$gatewaystringThe gateway key stored on the payment.
$payment_idintID of the payment.
$paymentRPRESS_PaymentThe 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), in RPRESS_Payment::get_gateway()
Was this page helpful?