Skip to content
Docs
Get RestroPress

Filter

rpress_gateway_supports_buy_now

Updated
On this page

Filters whether a payment gateway supports buy now.

Runs in rpress_gateway_supports_buy_now. The value is true when the gateway's supports list contains buy_now. Return true to treat a gateway as supporting direct purchase.

Parameters#

ParameterTypeDescription
$retboolTrue when 'buy_now' is in the gateway's supports list.
$gatewaystringGateway ID.

Return value#

bool. Whether the gateway supports buy now.

Example#

function my_gateway_supports_buy_now( $ret, $gateway ) {
	return $ret;
}
add_filter( 'rpress_gateway_supports_buy_now', 'my_gateway_supports_buy_now', 10, 2 );

Source#

Applied in:

  • includes/gateways/functions.php (line 170), in rpress_gateway_supports_buy_now()

See also#

Was this page helpful?