How to use new appointment hook
-
I try to use the ea_new_app_from_customer hook which is triggered when a new appointment is booked, but get the following error message from bootstrap.js:848:17 in the browser:
TypeError: response.responseJSON is undefined
So it seems that the hook needs to return a JSON, I tried to do the following but without success:
add_action( 'ea_new_app_from_customer', 'custom_callback_function', 10, 2 ); function custom_callback_function( $appointment_id, $appointment_data ) { // do stuff here //return $appointment_data; return json_encode($appointment_data); }
How should the return statement look like?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to use new appointment hook’ is closed to new replies.