How do I add padding to my time slots?

I realize this question has been asked many times, and I’ve reviewed the prior questions, but I need someone to guide me through my particular situation as I’m still a bit unclear on the specifics.

I need to offer two services, one is for 55 minutes and one is for 85 minutes. Each would need a 5 minute pad at the end so that I can gather myself and take some notes before the next appointment (meaning that the 60 minute or 90 minute blocks are being reserved, depending on the service). I would like the client to see that they are booking a 55 or 85 minute appointment (and ideally, the appointment when sent to their Google Calendar would also show up as 55 or 85 minutes) but have A+ block off 60 or 90 minutes, as appropriate.

What should I set for my base time, what should I set for my service duration and what code should I add to my functions.php of my current theme?

  • Jack Kitterhing
    • Code Norris

    Hi there @Joanne,

    Hope you’re well today and thanks for your question.

    Set your time base as 5 minutes, and then your services as 60 minutes and 90 minutes and then add this to your functions.php of your theme.

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

    And then this should work correctly for you :slight_smile:

    Thanks!

    Kind Regards

    Jack.

  • Jack Kitterhing
    • Code Norris

    Hi there @Joanne,

    Hope you’re well today, sorry for the confusion.

    Set your time base as 10 minutes and then set your service duration as 70 minutes

    and 100 minutes, and add this to your functions.php of your theme.

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

    Thank you!

    Kind Regards

    Jack.

  • Jack Kitterhing
    • Code Norris

    Hi there @Joanne,

    Hope you’re well today, nope that solution would take off 15 minutes of time, so that to them it only shows as 85 minutes and 55 minutes respectively :slight_smile:

    Though thinking now, that would technically give you 15 minutes of padding, but 5 minutes of padding isn’t possible as it stands, I could give you a solution for 10minutes of padding or is that too long?

    If it is too long, no problem, let me know and I’ll check with the lead developer if we can get this working for 5 :slight_smile:

    Thanks!

    Kind Regards

    Jack.

  • Jack Kitterhing
    • Code Norris

    Hi there @Joanne,

    Hope you’re well today, I’ve spoke with the lead developer today and the original filter works as it should,

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

    Add that to your themes function.php and it will display your duration as 55 minutes and 85 minutes, and actually book off, 60 minutes and 90 minutes.

    The time base and the service duration don’t make a difference, this filter actually changes just the text string that shows to them how long the appointment is, sorry for the confusion. But the above is what’s needed :slight_smile:

    Thanks!

    Kind Regards

    Jack.