Il tuo carrello è vuoto!
After Save (Late)
apply_filters( 'vikappointments_after_save_reservation_late', bool $status, array $data, bool $isNew, JModel $model )
Fires once all the details of the appointment has been saved.
Description
This hook is triggered after creating or updating an appointment record.
Use this hook in place of vikappointments_after_save_reservation
in case you wish to immediately access the saved extra data of the reservation, such as the options, the user notes and so on.
Parameters
- $status
-
(bool) True on success, false otherwise.
- $data
-
(array) The properties of the appointment that have been saved.
- $isNew
-
(bool) True in case the appointment has been created, false in case an existing appointment was updated.
- $model
-
(JModel) The model instance that handles the saving process.
Example
/**
* Trigger hook to allow the plugins to make something after
* saving an appointment.
*
* @param boolean $status True on success, false otherwise.
* @param mixed $data The saved record.
* @param boolean $isNew True if new, false in case of update.
* @param JModel $model The model instance.
*/
add_filter('vikappointments_after_save_reservation_late', function($status, $data, $isNew, $model)
{
// it is now possible to access the appointment details
$order = VAPOrderFactory::getAppointments($data['id']);
/**
* @todo do something after saving an appointment
*/
return $status;
}, 10, 4);
Changelog
Version | Description |
---|---|
1.2 | Introduced. |
Ultimo aggiornamento: 2021-10-04
Utile?