In this document:
Description
WordPress Hook that fires once there is a change to the customer information of a booked appointment. The key it’s watching is customer_information
.
Placement
This code should be placed in the file of your custom plugin.
Source Code
This action is located in the SSA_Hooks::maybe_do_appointment_customer_information_edited_hook()
function in class-hooks.php.
Usage for ssa/appointment/customer_information_edited
add_action('ssa/appointment/customer_information_edited', 'new_function_name', 10, 4);
Parameters
$appointment_id int
The ID of the appointment where customer information changed.
$data_after array
The data of the booked appointment after customer information changed, which includes several keys as discussed in ssa/appointment/booked.
$data_before array
The data of the booked appointment before the customer information changed, which includes several keys as discussed in ssa/appointment/booked.
$response
The response of editing customer information for the appointment.
Example – Show an Alert when the Customer Information is Edited
add_action('ssa/appointment/customer_information_edited', 'alert_customer_info_edited', 10, 4);
function alert_customer_info_edited($appointment_id, $data_after, $data_before, $response)
{
echo "The customer information of the appointment with ID: $appointment_id has changed.";
}
Related Guides
-
Developer Settings
-
New Booking App
-
ssa/appointments/customer_information/get_defaults Filter
-
ssa/templates/get_template_vars Filter