Skip to content
Docs
Get RestroPress

Filter

rpress_shop_supports_buy_now

Updated
On this page

Filters whether the store supports buy now purchases.

Runs in rpress_shop_supports_buy_now. The default is true only when taxes are disabled and exactly one gateway is enabled and that gateway supports buy now. Return a different value to override that logic.

Parameters#

ParameterTypeDescription
$retboolWhether the store supports buy now.

Return value#

bool. Whether the store supports buy now.

Example#

function my_shop_supports_buy_now( $ret ) {
	return false;
}
add_filter( 'rpress_shop_supports_buy_now', 'my_shop_supports_buy_now', 10, 1 );

Source#

Applied in:

  • includes/gateways/functions.php (line 189), in rpress_shop_supports_buy_now()

See also#

Was this page helpful?