appointments+ issue with capacity

http://procarecentre.ca/book/little-learners-play-group/

slots aref becoming unavailable after 1 booking even though capacity is set at 20

any idea why?

  • Adam Czajczyk

    Hello Jordan,

    I hope you're well today and thank you for your question!

    Since I don't have access to the back end of your site I can make an "educated guess" only but I suppose it's related to the way your services and service providers are set. Let me explain

    The "capacity" option in Appointments+ cannot "raise" the capacity. The maximum capacity is always equal to the number of service providers assigned to a given service and the "capacity" value can only decrease the number of spots available at the time.

    For example:
    - there's one service
    - there's three service providers, all offering that single service
    - maximum capacity would be three even if you set it to higher value
    - if you set capacity to 1 or 2 though, plugin won't allow booking more than 1 or two slots at the same time.

    Another example:
    - there's just one service and one or even no service provider
    - the capacity will always be 1 even if you set it to 2, 10 or 100

    I hope that makes sense. If this is the case, there are two alternative solutions that would let you overcome that limitation:

    1. Create more service providers (you might set them as "dummy" so no real user would be involved) and assign them to the same service

    2.Try adding this snippet of code

    function increase_capacity( $capacity, $service_id ) {
    		return 10;
    	}
    	add_filter( 'app_get_capacity', 'increase_capacity', 10, 2 );

    to the "functions.php" file of your active theme. It should raise the capacity to 10. If you wish to change that number change the value in "return line", e.g. for capacity of 20 use

    return 20;

    If you have additional questions, let me know please.

    Best regards,
    Adam