Back to Developer Guides

This guide applies to:

  • Basic Edition
  • Plus Edition
  • Pro Edition
  • Business Edition

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 your custom plugin file.

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 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;
}

Still stuck?

File a support ticket with our five-star support team to get more help.

File a ticket

  • This field is for validation purposes and should be left unchanged.
  • Please provide any information that will be helpful in helping you get your issue fixed. What have you tried already? What results did you expect? What did you get instead?

Related Guides