Increase amount of appointments on 1 time slot

Hello,

I've emailed already with your colleague George about how to increase the amount of appointments per time slot (which is standard 1 appointment per time slot) in het Appointments+ plugin. He said to use this code in your themes functions.php:

function increase_capacity( $capacity, $service_id, $worker_id ) {

return 10;

}

add_filter( 'app_get_capacity', 'increase_capacity', 10, 5 );

So i placed this code but i can't get it to work. I want to increase the amount of appointments per time slot to 3.

Thanks for your help and i hope to hear from you.

Best regards,
J.bond

  • Ash

    Hello @jos

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    For that you need to create two more providers. So, first create two users from Users > Add new using any email address. Then make those two users as providers for the same service. Their working hours should be same as main providers. Just one important thing, when you create these last two providers, you need make them dummy, please check screenshot.

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

  • jos

    Hello Ash,

    Thanks for your answer. Another question: How can i set an emailadres where the appointment emails go to? Because now these emails are sent to the emailaddress that is set in Wordpress Settings --> General. But here our email address is set, because all update and admin mails will be sent to this emailaddress, and i don't want my client to receive these mails. And there are also different serviceproviders with different emailaddresses. So my question is, can i set 1 main emailaddress, where all the appointment mails go to? Because i can't find a setting like this, or maybe there is a workaround for this?

    Thanks and i hope to hear from you.

  • Ash

    Hello @Jos

    I hope you are well today.

    Please try the following code:

    add_filter( 'app_get_admin_email', 'app_get_admin_email_cb' );
    function app_get_admin_email_cb( $email ){
    	return 'NEW EMAIL ADDRESS';
    }

    Change NEW EMAIL ADDRESS with your email address.

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag (<?php) at the beginning of the code.

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.