Your cart is empty!
Status Change
public function onStatusChangeTakeawayOrder( array $data ) : void
Fires every time the status of an order changes.
Description
Trigger event to let the plugins be notified every time the status of a take-away order changes.
This hook doesn't fire whenever you create a new order, 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 order.
$order = VREOrderFactory::getOrder($data['id']);
Parameters
- $data
-
(array) The details of the saved order. Always includes the
id
of the order and the newstatus
.
Return Value
None.
Example
/**
* Trigger event to let the plugins be notified every time the status of the orders change.
*
* @param array $data The details of the saved order.
*
* @return void
*/
public function onStatusChangeTakeawayOrder($data)
{
/**
* @todo status change observed, do something now
*/
}
Changelog
Version | Description |
---|---|
1.9 | Introduced. |
Last Update: 2023-12-29 14:15
Helpful?