Skip to content
Docs
Get RestroPress

Filter

rpress_straight_to_checkout

Updated
On this page

Filters whether customers are sent straight to checkout after adding an item to the cart.

The default is read from the redirect_on_add option. The result is cast to a boolean.

Parameters#

ParameterTypeDescription
$retboolWhether to redirect to checkout after adding an item.

Return value#

bool. Whether to redirect to checkout.

Example#

function my_straight_to_checkout( $redirect ) {
	return false;
}
add_filter( 'rpress_straight_to_checkout', 'my_straight_to_checkout' );

Source#

Applied in:

  • includes/rp-core-functions.php (line 1706), in rpress_straight_to_checkout()
Was this page helpful?