getPRO()) return; // MEC Settings $settings = $this->get_settings(); $ml_settings = $this->get_ml_settings(); // Booking module is disabled if(!isset($settings['booking_status']) or (isset($settings['booking_status']) and !$settings['booking_status'])) return; // Skip First Step $skip_step1 = isset($settings['booking_skip_step1']) && $settings['booking_skip_step1']; $event = $event[0]; $uniqueid = !empty($uniqueid) ? apply_filters('mec_booking_uniqueid_value', $uniqueid) : $event->data->ID; $tickets = $event->data->tickets ?? []; $dates = $event->dates ?? $event->date; // No Dates if(!count($dates)) return; // No Tickets if(!count($tickets)) return; $display_progress_bar = $this->can_display_booking_progress_bar($settings); // Redirect Payment Thank you $thankyou_message = apply_filters('mec_booking_redirect_payment_thankyou', ''); if(trim($thankyou_message)) { // Used in Message Template $message = $thankyou_message; include MEC::import('app.modules.booking.steps.message', true, true); return; } // Abort Booking Module $abort = apply_filters('mec_booking_module_abort', false, $event); if($abort !== false) { echo MEC_kses::full($abort); return; } // Shortcode Options if(!isset($from_shortcode)) $from_shortcode = false; if(!isset($ticket_id)) $ticket_id = NULL; $book = $this->getBook(); // User Booking Limits list($user_ticket_limit, $user_ticket_unlimited) = $book->get_user_booking_limit($event->data->ID); // Generate JavaScript code of Booking Module $javascript = ''; $do_skip = false; if($skip_step1 and count($tickets) === 1 and count($dates) === 1 and $user_ticket_limit == 1 and !$user_ticket_unlimited) { $do_skip = true; $javascript .= ''; } $javascript = apply_filters('mec-javascript-code-of-booking-module', $javascript, $uniqueid); // Include javascript code into the footer if($this->is_ajax()) echo ($javascript); else { $factory = $this->getFactory(); $factory->params('footer', $javascript); } ?>