Your cart is empty!
Status Change
do_action( 'vikrestaurants_status_change_restaurant_reservation', array $data )
Fires every time the status of a reservation changes.
Description
Trigger event to let the plugins be notified every time the status of a restaurant reservation changes.
This hook doesn't fire whenever you create a new reservation, as the status change is observed only in case the previously configured status is not empty.
It is possible to use the following code to access all the details of the reservation.
$reservation = VREOrderFactory::getReservation($data['id']);
Parameters
- $data
-
(array) The details of the saved reservation. Always includes the
id
of the reservation and the newstatus
.
Example
/**
* Trigger event to let the plugins be notified every time the status of the reservations change.
*
* @param array $data The details of the saved reservation.
*/
add_action('vikrestaurants_status_change_restaurant_reservation', function($data) {
/**
* @todo status change observed, do something now
*/
});
Changelog
Version | Description |
---|---|
1.3 | Introduced. |
Last Update: 2023-12-28
Helpful?