← All changes
|
app/Core/Handlers/BookingConfirmationPageHandler.php
+7
-1
3.0.8
→
3.0.16
View file →
| @@ -32,9 +32,15 @@ | ||
| 32 | 32 | |
| 33 | 33 | // Configure $wp_query + virtual WP_Post so FSE block themes don't fall back to 404.html. |
| 34 | 34 | $this->setupPageEnvironment('singular', [ |
| 35 | 35 | 'title' => __('Booking Confirmation', 'yatra'), |
| 36 | - 'object_id' => (int) ($booking->id ?? 0), | |
| 36 | + // Keep the virtual post ID at 0 (like the account/login/booking | |
| 37 | + // handlers). Using the booking row id made get_queried_object_id() | |
| 38 | + // collide with a real wp_posts row of the same id, so SEO plugins / | |
| 39 | + // WordPress emitted THAT page's title, description and OG tags on the | |
| 40 | + // confirmation page. The booking is read from the `yatra_booking` | |
| 41 | + // global, so no queried-object id is needed here. | |
| 42 | + 'object_id' => 0, | |
| 37 | 43 | 'post_type' => 'page', |
| 38 | 44 | 'post_name' => $confirmation_id, |
| 39 | 45 | ]); |
| 40 | 46 | |