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/TaxonomyPageHandler.php +9 -12 3.0.2.9 → 3.0.16 View file →
@@ -77,9 +77,16 @@
77 77 }
78 78
79 79 $taxonomy_data->trips = $tripsWithReviews;
80 80
81 - $this->prevent404();
81 + // Configure $wp_query + virtual WP_Post so FSE block themes resolve an archive
82 + // template (not 404.html) for taxonomy pages.
83 + $this->setupPageEnvironment('archive', [
84 + 'title' => (string) ($taxonomy_data->name ?? $taxonomy_data->title ?? $slug),
85 + 'object_id' => (int) ($taxonomy_data->id ?? 0),
86 + 'post_type' => 'page',
87 + 'post_name' => $slug,
88 + ]);
82 89
83 90 $this->setGlobal('yatra_taxonomy_data', $taxonomy_data);
84 91
85 92 $this->setQueryVars([
@@ -88,19 +95,9 @@
88 95 'yatra_taxonomy' => $taxonomy_data,
89 96 'yatra_page' => $base,
90 97 ]);
91 98
92 - $template_path = YATRA_PLUGIN_PATH . 'templates/single-taxonomy.php';
93 -
94 - if (!file_exists($template_path)) {
95 - $this->logError("Taxonomy template not found: {$template_path}");
96 - return false;
97 - }
98 -
99 - include $template_path;
100 - $this->exit();
101 -
102 - return true;
99 + return $this->selectTemplate('single-taxonomy', null, 'taxonomy-' . $taxonomy_type);
103 100 }
104 101
105 102 /**
106 103 * Get taxonomy data by type and slug