Appointments+ ver. 2.24+ No Longer Handles Durations Like 2.22-

My simple weekly display used to have 30-minutes time-slots from 9:30am to 5:30pm. Because I had the "service" set to 90-minutes, when someone booked the 9:30am to 10:00am slot, the schedule would block from 9:30am to 11:00am...11am would be the next available time slot to book. Now, with version 2.23, all that changed. Can I get some help?

    • Paul

      Thanks, James. NOTICE: I made a mistake on the Appointments+ version at issue here. Version 2.2.3 and earlier are working perfectly. Beginning with version 2.2.4+, the "Durations" addon does not handle the additional time for the service option...if it's the "addon" that's the problem.

      Yes, I remember working with Panos on this a couple months ago. I need to get this issue resolved if I'm going to be able to continue to receive updates...at $19/month. Panos reported he does not get the error I'm getting, and I stated I'd continue to look at what might be happening on my side. Now, I'm not convinced Panos had the exact same setup as mine...so I'd like to have Panos look into my settings more and discuss with me his exact settings and results. Thank you!

  • Panos

    Hi Paul ,

    Thanks for spotting this. There were some changes in order to fix some other issue and we didn't notice the durations add-on time-slots were affected.

    Before going on checking your specific changes could you try replacing a file and see if this fixes the durations for you?

    The file to replace is
    appointments/includes/helpers.php
    and I have it attached here.

    Before replacing it you can keep a backup of previous file by renaming it for example to helpers.php.txt.

    After enabling the Durations add-on, the start times of the time-slots should be depended on the "Time base" option from General settings (eg 30 minutes). The end time should be depending on the durations of the service though (eg 90 minutes). I think this is the correct time, as this is when the appointment is expected to end.

    Please let me know if the new file works for you. If not I can have a look at your settings :slight_smile:

    Thanks!

  • Paul

    Hi Panos! The time slots are now 90 minutes long instead of 30 minutes. They need to be 30 minutes.

    There's also an ongoing issue since version 2.2.2 came out... The past time slots do not get blocked like they did in version 2.2.1... For example, if the time is 12 Noon... time slot 9:30am - 10am show it's still available...I can even make an appointment for 9:30am today! LOL! ...but who'd do a thing like that?

  • Panos

    Hi Paul ,

    The change in the end time has been made on purpose to match the end time of the appointment, I haven't done a commit yet as I need to consult with main dev about this.

    I have added a filter in the new file I provided , so by adding
    add_filter( 'appointments_use_legacy_duration_end_time', '__return_true', 1 );
    in a mu-plugin should allow to have the slot duration based on the Time Base (30 minutes).

    There's also an ongoing issue since version 2.2.2 came out...

    I can't replicate that :disappointed: It is based on the timezone set on server. Perhaps you could do some test by changing the php default timezone and check if these changes affect the calendar. You can check that by adding:

    date_default_timezone_set('Europe/London');

    or
    date_default_timezone_set('America/Los_Angeles');
    in a mu-plugin.

    Please let me know if I am missing something here :slight_smile:

    Thanks!

  • Paul

    Yes, thanks, Panos... The time slot should be based on the "general" settings for "Time Base". The resulting appointment should take up the time-slots for the "duration" of the "Service" length of time (handled in the back-end).. That's how version 2.2.1 works, I assume. Thanks for your hard work on getting this fixed, Panos...I really appreciate it. I'm a programmer, too...since 1980...published several software programs including an integrated timekeeping & billing accounting system, DOS based, dBase language.

    From a user perspective (me)... If a user needs some breathing time between appointments, this is the only way to accomplish it. So, our appointments are stated to be 30-minutes (phone consultations) but they often extend beyond 30-minutes...so we need to advertise the appointment is 30-minutes...not 90-minutes. Each appointment time-slot should represent the 30-minute consultation. And to prevent "back-to-back" or overlap (missed call because a call went over the 30-minute length) we need to have a buffer, and that buffer has always been the "Durations" add-on which uses the "Service" time (90 minutes) to block that amount of time when a time-slot has been booked. I know you understand now that I have described this scenario.

    Yes, your filter worked and now the Appointments+ works just like version 2.2.1, now. I hope this fix gets approved for version 2.2.6. Thank you, Panos!

  • Panos

    Good to know it works for you :slight_smile:

    It makes total sense! Perhaps the Paddings add-on could be helpful in such cases, but since your setup works no need to change anything!

    Regarding the timezone issue did you manage to do the test I suggested? If by changing the php timezone (eg with the above suggestions) affects the timetable, then it's probably because your timezone is different than server's timezone.

    Kind regards!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.