Skip to content
Docs
Get RestroPress

Filter

rpress_no_guest_checkout

Updated
On this page

Filters whether guest checkout is disallowed.

The default is true when the Login/Register Option setting is login only. When true, customers must log in or register to check out. The result is cast to a boolean.

Parameters#

ParameterTypeDescription
$retboolTrue when guest checkout is not allowed.

Return value#

bool. True to require login.

Example#

function my_no_guest_checkout( $no_guest ) {
	return $no_guest;
}
add_filter( 'rpress_no_guest_checkout', 'my_no_guest_checkout' );

Source#

Applied in:

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