Skip to content
Docs
Get RestroPress

Filter

rpress_is_checkout

Updated
On this page

Filters whether the current request is the checkout page.

Runs at the end of rpress_is_checkout(). The check passes if the current page is the configured purchase page or if the content contains the fooditem_checkout shortcode, the checkout block, or Elementor content with that shortcode.

Parameters#

ParameterTypeDescription
$is_checkoutboolTrue when the current page is the checkout.

Return value#

bool. Whether it is the checkout page.

Example#

function my_is_checkout( $is_checkout ) {
	if ( ! $is_checkout && is_page( 'order-now' ) ) {
		return true;
	}
	return $is_checkout;
}
add_filter( 'rpress_is_checkout', 'my_is_checkout', 10, 1 );

Source#

Applied in:

  • includes/checkout/functions.php (line 48), in rpress_is_checkout()

See also#

Was this page helpful?