Action
rpress_fooditem_increase_earnings
On this page
Fires after the earnings total of a menu item has been increased.
Runs in RPRESS_Fooditem::increase_earnings() after the _rpress_fooditem_earnings meta has been updated. It does not fire when the update fails.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$fooditem_id | int | Menu item ID. |
$earnings | float | New total earnings. |
$fooditem | RPRESS_Fooditem | The menu item object. |
Example#
function my_after_earnings_increase( $fooditem_id, $earnings, $fooditem ) {
update_post_meta( $fooditem_id, '_my_last_earnings_check', $earnings );
}
add_action( 'rpress_fooditem_increase_earnings', 'my_after_earnings_increase', 10, 3 );
Source#
Fired from:
includes/class-rpress-fooditem.php(line 514), inRPRESS_Fooditem::increase_earnings()
See also#
Was this page helpful?
