Filter
rpress_can_checkout
On this page
Filters whether the customer may check out.
Runs in rpress_can_checkout(). The default value is always true. Return false to block checkout.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$can_checkout | bool | True by default. |
Return value#
bool. Whether checkout is allowed.
Example#
function my_can_checkout( $can_checkout ) {
if ( ! is_user_logged_in() ) {
return false;
}
return $can_checkout;
}
add_filter( 'rpress_can_checkout', 'my_can_checkout', 10, 1 );
Source#
Applied in:
includes/checkout/functions.php(line 58), inrpress_can_checkout()
See also#
Was this page helpful?
