Filter
rpress_checkout_upsell_display_amount
On this page
Filters the price amount displayed on a checkout upsell card.
The amount is the item price adjusted by the same prices_include_tax and tax_item rules the menu uses. For variable prices core passes the lowest option and the card shows it as a From price. The result is cast to float and formatted with the currency settings.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$amount | float | Display amount. |
$fooditem_id | int | Menu item (fooditem) ID. |
Return value#
float. Display amount.
Example#
add_filter( 'rpress_checkout_upsell_display_amount', 'my_upsell_display_amount', 10, 2 );
function my_upsell_display_amount( $amount, $fooditem_id ) {
return round( $amount, 1 );
}
Source#
Applied in:
includes/features/checkout-upsell/loader.php(line 280), inrpress_checkout_upsell_display_amount()
Was this page helpful?
