public function onStatusChangeRestaurantReservation( array $data ) : void

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 new status.

Return Value

None.


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.
 *
 * @return  void
 */
public function onStatusChangeRestaurantReservation($data)
{
    /**
     * @todo status change observed, do something now
     */
}

Changelog

Version Description
1.9 Introduced.
Last Update: 2023-12-29 14:15
Helpful?