PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | app/Core/Handlers/BookingPageHandler.php +8 -14 3.0.3 → 3.0.16 View file →
@@ -32,10 +32,15 @@
32 32 if (!empty($route_data['trip']) && is_string($route_data['trip'])) {
33 33 $_GET['trip'] = sanitize_title($route_data['trip']);
34 34 }
35 35
36 - // Prevent 404 handling
37 - $this->prevent404();
36 + // Configure $wp_query + virtual WP_Post so FSE block themes don't fall back
37 + // to 404.html — see BasePageHandler::setupPageEnvironment().
38 + $this->setupPageEnvironment('singular', [
39 + 'title' => __('Booking', 'yatra'),
40 + 'post_type' => 'page',
41 + 'post_name' => $base,
42 + ]);
38 43
39 44 // Set up query vars for backward compatibility
40 45 $this->setQueryVars([
41 46 'yatra_page' => $base,
@@ -260,18 +265,7 @@
260 265 if ($booking !== null) {
261 266 $this->setGlobal('booking', $booking);
262 267 }
263 268
264 - // Load the booking page template
265 - $template_path = YATRA_PLUGIN_PATH . 'templates/booking.php';
266 -
267 - if (!file_exists($template_path)) {
268 - $this->logError("Booking template not found: {$template_path}");
269 - return false;
270 - }
271 -
272 - include $template_path;
273 - $this->exit();
274 -
275 - return true;
269 + return $this->selectTemplate('booking', null, 'booking');
276 270 }
277 271 }