Open WebTechPT opened 2 years ago
I have the same problem. I can't remove the time slot for Teams /Providers/. I was looking for it in the code but I can't find it.
I wrote in support and this is the answer.
Thank you to contact our support team and sorry for the delay.
The hierarchy of the appointment scheduling is built in that way:
added a snippet to ignore: duration, buffer time before, buffer time after, locked time before parameters
`add_filter( 'jet-apb/calendar/custom-schedule', '__modify_appointment_data', 0, 5 );
function __modify_appointment_data ( $value, $meta_key, $default_value, $provider, $service ) { if ( $provider && 'buffer_before'===$meta_key || 'buffer_after'===$meta_key || 'locked_time'===$meta_key || 'default_slot'===$meta_key ){ $calendar = \JET_APB\Plugin::instance()->calendar; if ( 'recursive' !== $default_value && $calendar->get_schedule_settings( $provider, $service, null, 'use_custom_schedule' ) ) { $value = $calendar->get_schedule_settings( null, $service, 'recursive', $meta_key ); } } return $value; }`
YES! That's exactly what i am facing with a project! I want to have working hours taken from the Employees BUT duration to be always from the service. I thing there is a necessity to detach the duration from the working hours because they are 2 different things and be able to choose where to use working hours and duration (from Employee or from Service).
By the way, the code snippet from Loverko008 worked like a charm and did exactly this
I have 2 Services: Service A: 30 minutes duration Service B: 60 minutes duration
I have 2 people on the team: Person A: Works Monday, Wednesday and Friday Person B: Works Tuesday and Thursday
When I set "Custom Schedule" on Team Person, it forces me to set "Duration" and ignore Service Duration...