Skip to content
Docs
Get RestroPress

Filter

rpress_checkout_ux_should_load

Updated
On this page

Filters whether the checkout UX scripts load on the current request.

Never runs in the admin. The default is true on the checkout page, and on other pages when a minimum order is set and the frontend script rp-frontend is enqueued.

Available since RestroPress 3.5.

Parameters#

ParameterTypeDescription
$loadboolWhether to load the scripts.
$on_checkoutboolWhether this is the checkout page.

Return value#

bool. Whether to load the scripts.

Example#

add_filter( 'rpress_checkout_ux_should_load', 'my_checkout_ux_should_load', 10, 2 );
function my_checkout_ux_should_load( $load, $on_checkout ) {
	return $load || is_page( 'order-online' );
}

Source#

Applied in:

  • includes/features/checkout-ux/hooks.php (line 35), in rpress_checkout_ux_should_load()
Was this page helpful?