Filter
rpress_checkout_upsell_is_active
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#
| Parameter | Type | Description |
|---|---|---|
$active | bool | Whether the row renders. |
$settings | array | Normalised 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), inrpress_checkout_upsell_is_active()
See also#
Was this page helpful?
