• Resolved matthiasd

    (@matthiasd)


    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

    (@codepeople)

    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.