Your cart is empty!
After Save (Late)
do_action( 'vikrestaurants_after_save_tkreservation_late', array $data, bool $isNew, JModel $model )
Fires once all the details of the take-away order has been saved.
Description
This hook is triggered after creating or updating a take-away order record.
Use this hook in place of vikrestaurants_after_save_tkreservation
in case you wish to safely access the saved extra data of the order, such as the the ordered items.
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.
- $isNew
-
(bool) Whether the order has been created or updated.
- $model
-
(JModel) The model used to save the order.
Example
/**
* Trigger event to allow the plugins to make something after saving
* an order into the database. Fires once all the details of
* the order has been saved.
*
* @param array $data The saved record.
* @param bool $isNew True if the record was inserted.
* @param JModel $model The model instance.
*/
add_action('vikrestaurants_after_save_tkreservation_late', function($data, $isNew, $model) {
/**
* @todo do something after saving an order
*/
}, 10, 3);
Changelog
Version | Description |
---|---|
1.3 | Introduced. |
Last Update: 2023-12-28
Helpful?