In this document:
Description
WordPress filter that enables the manipulation of the duration of the pending_form status of an appointment. If the booking hasn’t been completed at the end of the duration, the status of the appointment is changed to abandoned.
The pending_form functionality is further explained in our guide on preventing double-bookings in Formidable and Gravity Forms.
Placement
This code should be placed in the file of your custom plugin.
Source Code
This filter is located in the SSA_Forms::schedule_pending_form_cleanup()
function in class-forms.php.
Usage for ssa/forms/pending_form_duration
add_filter('ssa/forms/pending_form_duration', 'new_function_name', 10, 3);
Parameters
$seconds_to_hold_pending_form_status int
Time in seconds to hold a pending_form status for an appointment before changing it to abandoned.$appointment_id int
The ID of the appointment with a pending_form status.$data array
The data of the appointment with a pending_form status, which includes several keys as discussed in ssa/appointment/booked.
Example – Custom Pending Form Duration
add_filter('ssa/forms/pending_form_duration', 'custom_pending_form_duration', 10, 3);
function custom_pending_form_duration($seconds_to_hold_pending_form_status, $appointment_id, $data)
{
return 10 * MINUTE_IN_SECONDS;
}
Related Guides
-
Developer Settings
-
New Booking App
-
ssa/appointments/customer_information/get_defaults Filter
-
ssa/templates/get_template_vars Filter