Skip to content
Docs
Get RestroPress

Filter

rpress_show_gateways

Updated
On this page

Filters whether the gateway selector is shown at checkout.

Runs in rpress_show_gateways. The default is true when more than one gateway is enabled and the cart total is above zero; otherwise false. Return false to hide the gateway selector.

Parameters#

ParameterTypeDescription
$show_gatewaysboolWhether to show the gateway selector.

Return value#

bool. Whether to show the gateway selector.

Example#

function my_show_gateways( $show_gateways ) {
	if ( rpress_get_cart_total() < 5 ) {
		return false;
	}
	return $show_gateways;
}
add_filter( 'rpress_show_gateways', 'my_show_gateways', 10, 1 );

Source#

Applied in:

  • includes/gateways/functions.php (line 309), in rpress_show_gateways()

See also#

Was this page helpful?