Action
rpress_remove_fooditem_from_payment
On this page
Fires after a menu item has been removed from an order on the edit order screen.
Runs once for each menu item removed when an administrator saves the order details form, immediately after the item is removed from the payment.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$payment_id | int | The order (payment) ID. |
$fooditem_id | int | The ID of the menu item that was removed. |
Example#
function my_after_item_removed( $payment_id, $fooditem_id ) {
add_post_meta( $payment_id, 'my_removed_item', absint( $fooditem_id ) );
}
add_action( 'rpress_remove_fooditem_from_payment', 'my_after_item_removed', 10, 2 );
Notes#
The second argument comes from submitted form data and is not cast to an integer before the hook runs.
Source#
Fired from:
includes/admin/payments/actions.php(line 185), inrpress_update_payment_details()
See also#
Was this page helpful?
