How to find hooks
Every function in our plugin has several hooks which let you invoke functions before/after it is executed and override its return value.
Normally each function defined using birch_defn has 2 actions and 1 filter accompanied. The 2 actions are triggered before and after the function is called. The filter is used to override the return value of the function.
There is a function called reschedule_appointment1on1 in the includes/birchschedule/model/booking/package.php file. If this function is called, the code will be like this.
$birchschedule->model->booking is the package of the function, which is simulated using php objects.
There are 2 actions for this function.
One is ‘birchschedule_model_booking_reschedule_appointment1on1_before’ which is triggered before the function is called. The arguments of this action are same with the ones of the function. The other is ‘birchschedule_model_booking_reschedule_appointment1on1_after’ which is triggered after the function is called. The arguments are the ones of the function plus the return value.
The filter name is ‘birchschedule_model_booking_reschedule_appointment1on1′. It is used to override the return value of the function. Its arguments are the return value plus the ones of the function.