Skip to content
Docs
Get RestroPress

Filter

rpress_checkout_upsell_settings

Updated
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#

ParameterTypeDescription
$settingsarrayNormalised 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), in rpress_checkout_upsell_settings()

See also#

Was this page helpful?