PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.27
Booktics – Appointment Booking Calendar for Service Businesses v1.0.27
1.0.29 1.0.28 1.0.27 1.0.26 1.0.25 1.0.24 1.0.23 1.0.22 1.0.21 1.0.20 1.0.19 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 All 31 releases
← All changes | base/services/schedule-manager.php +11 -2 1.0.3 → 1.0.27 View file →
@@ -93,8 +93,14 @@
93 93 */
94 94 private function __construct( $schedule_data ) {
95 95 $this->database = new Booktics_Database();
96 96 $this->schedule_data = $schedule_data;
97 + if ( ! isset( $this->schedule_data['enable_custom_holiday'] ) || ! $this->schedule_data['enable_custom_holiday'] ) {
98 + $this->schedule_data['holiday'] = array();
99 + }
100 + if ( ! isset( $this->schedule_data['enable_custom_schedule'] ) || ! $this->schedule_data['enable_custom_schedule'] ) {
101 + $this->schedule_data['custom'] = array();
102 + }
97 103 $this->init(
98 104 $this->schedule_data['schedule'] ?? array(),
99 105 $this->schedule_data['custom'] ?? array(),
100 106 $this->schedule_data['holiday'] ?? array()
@@ -354,13 +360,16 @@
354 360 string $end_time,
355 361 string $week_day,
356 362 string $custom_date
357 363 ): array {
364 + $utc_start_time = booktics_time_to_gmt( $start_time, $custom_date );
365 + $utc_end_time = booktics_time_to_gmt( $end_time, $custom_date );
366 +
358 367 return array(
359 368 'team_member_id' => $this->team_member_id,
360 369 'service_id' => $this->service_id,
361 - 'start_time' => $start_time,
362 - 'end_time' => $end_time,
370 + 'start_time' => $utc_start_time,
371 + 'end_time' => $utc_end_time,
363 372 'week_day' => $week_day,
364 373 'custom_date' => $custom_date,
365 374 );
366 375 }