Filter
rpress_checkout_ux_should_load
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#
| Parameter | Type | Description |
|---|---|---|
$load | bool | Whether to load the scripts. |
$on_checkout | bool | Whether 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), inrpress_checkout_ux_should_load()
Was this page helpful?
