Appointment "padding" time

Okay, first of all, LOVING this plugin. Anways.

All our appointments are 45 minutes long, but always start on the hour. I see that I can add a custom duration to make them 45 minutes, but then the schedule slots are every 45 too. So for now I have them set at 60 minutes, but then the “Lasts(approx):” and Google Calendar show 60 too. Is there a way to set up some padding time after appointments, so the duration the client sees is 45 minutes, but they get scheduled every 60?

  • Elliott Bristow
    • The Bug Hunter

    Hi @lauren_sell,

    Welcome to the forums!

    Unfortunately this is not currently available… but it is a much requested feature, and one that is definitely under consideration.Keep an eye on the release notes to see if we add it.

    For now, the way you are doing it is the way we recommend. Perhaps in the description of the appointment you can add a line that says “45 mins” so that people don’t’ get confused?

  • Lauren Sell
    • WPMU DEV Initiate

    Yeah, if that’s the only way to go I’ll do that, but it’s still not exactly not confusing if it says 45 minutes in one place and 60 in others.

    If I go spelunking in the code, would I be able to set the duration to be shorter than the base time? Or would that just break everything?

  • Elliott Bristow
    • The Bug Hunter

    I’m not sure how easy it would be to specify different times within the appointment, but it might be possible to detach the appointment length in the plugin from the length sent to gCal. If you dig around the code that syncs with gCal you might be able to find a way to tweak the appointment length before the sync?

    I’ll tag the developer to have a look at this thread in case he can point you to the right bit of code to take a look at.

  • Hakan
    • The Incredible Smush

    Hi,

    Is there a way to set up some padding time after appointments, so the duration the client sees is 45 minutes, but they get scheduled every 60?

    Yes, that is possible.

    Set time base as 60 minutes, your service duration 60 minutes again and add these codes inside functions.php of your current theme:

    function modify_duration_text( $text, $duration ) {
    return '45 minutes';
    }
    add_filter('app_confirmation_lasts', 'modify_duration_text', 10, 2);

    Cheers,

    Hakan

  • Hakan
    • The Incredible Smush

    No, because in this case your appointments are regarded as lasting for 60 minutes (45 minutes actual time + 15 minutes break time).

    So except for the text displayed to the client, service will be 60 minutes in everywhere and I think that is the correct approach as you probably don’t want to be booked for those 15 minutes breaks.

    There is another solution, though, and it may be better for this case, but only for *monthly schedules*. Set your time base as 15 minutes and service duration as 45 minutes. Then add these codes in functions.php instead of the above codes:

    function once_only_per_hour( $class_name, $ccs, $cce) {
    global $appointments;
    // Check if $ccs divisible by 3600=1 hour
    if ( $ccs % 3600 == 0 )
    return $class_name;
    return "app_hide";
    }
    add_filter( 'app_class_name', 'once_only_per_hour', 10, 3 );

    This will set your service duration as 45 minutes, but lets the client to book only on start of the hour, e.g. 9:00, 10:00, etc. Please see attached screenshot.

    GCal and admin side will also show 45 minutes in this case.

    Cheers,

    Hakan

  • akaanc
    • Flash Drive

    Is there a news for time padding feature. Without padding it’s not enough time to prepeare for the next appointment. If we enter higher duration for the service, then users will see it in front end.

    So in each service we can add a padding time that users cant see?

  • pxwm
    • WP Core Meltdown

    Hi @akaanc

    In v1.3.1 there is far more flexibility and you can add Multiple Breaks for each day, so effective you can add some form of padding at the beginning or end of a Service. However the padding would be set the same for all services.

    There are also a number of posts relating to adding bespoke code to the functions.php file so you could write some bespoke code to add padding for each Service.

    I hope that helps

    Regards

    SteveB

  • akaanc
    • Flash Drive

    Hi @pxwm

    Thank you for your interest. Our schedule is very complex so i don’t think i can use breaks as padding. But if there is a code that can add a padding of 15 or 30 mins it would be great.

    Padding time feature is widely used in appointment and booking softwares, it would be a great if appointments+ has it too.

  • pxwm
    • WP Core Meltdown

    Hi @akaanc

    It may be best if you create a new post as this one is a few months old and a new one will be picked up by the wpmu staff.

    I’m aware this feature has been requested and I’m sure it has been added to the feature list for consideration but you may wish to ask again in your new post.

    You may wish to review the following post to see if this helps: https://premium.wpmudev.org/forums/topic/how-can-i-account-for-travel-time-without-adding-it-to-the-service-time

    Regards

    SteveB

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.