When using the filter "amelia_before_get_timeslots_filter" to change the amount of persons in a service, it's sending the persons parameters as 1 during the ajax call on the 2.0 form.
If personsCount is updated to 2, i would expect the ajax call to be updated also.
This is a service that is mandatory to come with someone (min capacity 2, max capacity 2), And its important because it will use 2 resources. If the client forgets to add that he is comming with someone, other slots won't be blocked accordingly.
So i need a way to make this service always bring someone, without the user having to input manually.
When using the filter "amelia_before_get_timeslots_filter" to change the amount of persons in a service, it's sending the persons parameters as 1 during the ajax call on the 2.0 form.
https://thefloat.com.py/wp-admin/admin-ajax.php?action=wpamelia_api&call=/slots&queryTimeZone=America%2FAsuncion&monthsLoad=1&locationId=1&serviceId=12&serviceDuration=5400&providerIds=35,36,37,38,39,77&group=1&page=booking&persons=1
function amelia_before_get_timeslots_filter($props)
{
if ($props['serviceId'] === 12) {
$props['personsCount'] = 2;
}
return $props;
}
add_filter('amelia_before_get_timeslots_filter', 'amelia_before_get_timeslots_filter', 0, 1);
If personsCount is updated to 2, i would expect the ajax call to be updated also.
This is a service that is mandatory to come with someone (min capacity 2, max capacity 2), And its important because it will use 2 resources. If the client forgets to add that he is comming with someone, other slots won't be blocked accordingly.
So i need a way to make this service always bring someone, without the user having to input manually.