Filter
rpress_gateway_supports
On this page
Filters the features supported by a payment gateway.
Runs in rpress_get_gateway_supports. The list is read from the supports key of the gateway in the enabled gateways list, and is empty when the gateway has none or is not enabled. The built-in PayPal gateway supports buy_now.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$supports | array | List of feature slugs the gateway supports. |
$gateway | string | Gateway ID. |
Return value#
array. The supported feature slugs.
Example#
function my_gateway_supports( $supports, $gateway ) {
if ( 'my_gateway' === $gateway && ! in_array( 'buy_now', $supports, true ) ) {
$supports[] = 'buy_now';
}
return $supports;
}
add_filter( 'rpress_gateway_supports', 'my_gateway_supports', 10, 2 );
Source#
Applied in:
includes/gateways/functions.php(line 158), inrpress_get_gateway_supports()
See also#
Was this page helpful?
