| @@ -33,9 +33,14 @@ | ||
| 33 | 33 | |
| 34 | 34 | // Configure $wp_query + virtual WP_Post so FSE block themes don't fall back to 404.html. |
| 35 | 35 | $this->setupPageEnvironment('singular', [ |
| 36 | 36 | 'title' => __('Checkout', 'yatra'), |
| 37 | - 'object_id' => (int) ($booking->id ?? 0), | |
| 37 | + // Keep the virtual post ID at 0 (like the account/login/booking | |
| 38 | + // handlers). Using the booking row id made get_queried_object_id() | |
| 39 | + // collide with a real wp_posts row of the same id, so SEO plugins / | |
| 40 | + // WordPress emitted THAT page's SEO on this page. The booking is read | |
| 41 | + // from the `yatra_booking` global, so no queried-object id is needed. | |
| 42 | + 'object_id' => 0, | |
| 38 | 43 | 'post_type' => 'page', |
| 39 | 44 | 'post_name' => $token, |
| 40 | 45 | ]); |
| 41 | 46 | |