Filter
rpress_checkout_upsell_settings
On this page
Filters the normalised checkout upsell settings.
Built from the checkout_upsell_* options by rpress_checkout_upsell_settings(). Used to decide whether the Add to your order row shows and which items it offers. The array has 'enabled' (bool), 'heading' (string), 'source' ('items' or 'category'), 'items' (up to 4 menu item IDs) and 'category' (food-category term ID).
Parameters#
| Parameter | Type | Description |
|---|---|---|
$settings | array | Normalised settings. |
Return value#
array. Settings with the same keys.
Example#
add_filter( 'rpress_checkout_upsell_settings', 'my_upsell_settings', 10, 1 );
function my_upsell_settings( $settings ) {
$settings['heading'] = __( 'Complete your meal', 'my-plugin' );
return $settings;
}
Source#
Applied in:
includes/features/checkout-upsell/loader.php(line 54), inrpress_checkout_upsell_settings()
See also#
Was this page helpful?
