Title: Execute PHP method on new reservation?
Last modified: July 15, 2020

---

# Execute PHP method on new reservation?

 *  Resolved [matthiasd](https://wordpress.org/support/users/matthiasd/)
 * (@matthiasd)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/execute-php-method-on-new-reservation/)
 * Hi,
 * I would like to execute a PHP method (which in turn makes a call to an external
   API) each time a new reservation is made. Is this possible?
 * Regards
    Matthias

Viewing 1 replies (of 1 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/execute-php-method-on-new-reservation/#post-13127384)
 * Hi,
 * The following hook can be used to know when a booking is made:
 * add_action( ‘cpappb_process_data’, ‘new_appointent’, 11, 1 );
 *     ```
       function new_appointment($params)
       {
           // do stuff here, 
           // $params is an associative array with the booking data
       }
       ```
   
 * In other plugin versions there is also a WebHook add-on to post the booking data
   to an external URL without needed to write a piece of code for that purpose.
 * Thank you for using the plugin!

Viewing 1 replies (of 1 total)

The topic ‘Execute PHP method on new reservation?’ is closed to new replies.

 * ![](https://ps.w.org/appointment-hour-booking/assets/icon-256x256.png?rev=1784135)
 * [Appointment Hour Booking - Booking Calendar](https://wordpress.org/plugins/appointment-hour-booking/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/appointment-hour-booking/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/appointment-hour-booking/)
 * [Active Topics](https://wordpress.org/support/plugin/appointment-hour-booking/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/appointment-hour-booking/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/appointment-hour-booking/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/execute-php-method-on-new-reservation/#post-13127384)
 * Status: resolved