Skip to content
Docs
Get RestroPress

Filter

rpress_payments_table_search_gateway

Updated
On this page

Filters the gateway used to filter the orders query.

Receives the gateway value from the request (or null when none is set) before the orders query is built. A value of all is later treated as no gateway filter.

Available since RestroPress 1.0.0.

Parameters#

ParameterTypeDescription
$gatewaystring|nullThe gateway slug from the gateway request parameter.

Return value#

string|null. The gateway slug to filter by.

Example#

function my_orders_search_gateway( $gateway ) {
	return 'cod' === $gateway ? 'manual' : $gateway;
}
add_filter( 'rpress_payments_table_search_gateway', 'my_orders_search_gateway' );

Source#

Applied in:

  • includes/admin/payments/class-payments-table.php (line 2511), in RPRESS_Payment_History_Table::payments_data()

See also#

Was this page helpful?