Skip to content
Docs
Get RestroPress

Filter

rpress_checkout_upsell_is_active

Updated
On this page

Filters whether the checkout upsell row renders on this request.

Defaults to the enabled setting, and off when AJAX ordering is disabled. Return false to suppress the row, for example for specific services or customers.

Parameters#

ParameterTypeDescription
$activeboolWhether the row renders.
$settingsarrayNormalised upsell settings.

Return value#

bool. Whether to render the row.

Example#

add_filter( 'rpress_checkout_upsell_is_active', 'my_upsell_is_active', 10, 2 );
function my_upsell_is_active( $active, $settings ) {
	return $active && 'delivery' === rpress_selected_service();
}

Source#

Applied in:

  • includes/features/checkout-upsell/loader.php (line 315), in rpress_checkout_upsell_is_active()

See also#

Was this page helpful?