Why are services durations limited to 24*time base

I set time base in General settings to 15 minutes.

If I create Services I get only selectable durations from 15 to 360 minutes. I need 780 minutes and more.

I found the corresponding php code in appointments.php line 7376 (function add_service):
$k_max = apply_filters( 'app_selectable_durations', min( 24, (int)(1440/$min_time) ) );
and changed it to:
$k_max = apply_filters( 'app_selectable_durations', (int)(1440/$min_time) );
as suggested by S H Mohanjith in the 'Plugins and Code' chat.

Can you please clarify the limitation to 24 for $k_max and maybe update the code so I don't run into problems on the next update?

Thank you for your help!

  • Vaughan
    • Support/SLS MockingJay

    Hi @Thomas,

    I don't know, that's an interesting question though & I will certainly need to ask the developer for some feedback on this for you. Hopefully the developer can respond quickly, I know we have a new version coming out soon, so I can't say whether he could add this functionality to the next release or not, but maybe the release after.

    Hope this helps

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.