Unwanted Block Time added before Appointment

Support forumCategory: BugsUnwanted Block Time added before Appointment
jacobs99 asked 8 months ago

I have a duration of 120 minutes and a slot time of 30 minutes. When an appointment is booked, an additional block tome of 90 min is added before which renders this situation not workable anymore.
I have been very satisfied with your plugin for about 2 years now. And I would like to continue using it.

Kindly get a fast fix for this, thank you for your good work as well :-)

2 Answers
Nikola Loncar Staff answered 8 months ago
Hi Jacobs, do you have block before time inside EA Service settings? Can you please share link to form page so we can test it? Best regards, Nikola
jacobs99 replied 8 months ago

Thank you Nikola – atm I do literally not have time for beta testing. That said, if I do have some time, I will set up a page for you and post it, so you can see. Block time before and after is set to 0. I looked through the comments and there is at least one person who has exactly the same issue.

Because I use the page professionally I had to move forward, so I added the following code into your hook and now it works:

add_action( ‘ea_new_app_from_customer’, ‘custom_callback_function’, 10, 2 );

function custom_callback_function( $appointment_id, $appointment_data ) {

$service = $appointment_data[‘service’];

if ($service == ‘3’)
$sql = “UPDATE wp_ea_appointments SET start = ADDTIME(start,’01:30:00′) WHERE id = $appointment_id”;

global $wpdb;
$results = $wpdb->get_results($sql);

As you can see, when the person books a 2 hour appointment, the database record stores 14:00 to 16:00 and the UI then blocks 12:30 to 16:00, effectively blocking 1.5 hours before the start. By adding the 1.5 hours to the start time with the sql, the appointment internally is set to 30 minutes, ie 15:30 to 16:00 and because the UI then blocks 1.5 hours before that, it shows correctly.

wukutuphane answered 8 months ago
I have the same problem. Might be related to upgrading to latest version of word press but not sure. Everything was normal until recently, now unexpected block before the appointments occur. We'd really appreciate your timely help. Thanks!