← All changes
|
app/Services/TransactionalEmailTemplateService.php
+3
-0
3.0.13
→
3.0.16
View file →
| @@ -1004,8 +1004,11 @@ | ||
| 1004 | 1004 | 'customer_phone' => (string) ($booking->contact_phone ?? ''), |
| 1005 | 1005 | 'booking_reference' => (string) ($booking->reference ?? ''), |
| 1006 | 1006 | 'booking_id' => (string) $bookingId, |
| 1007 | 1007 | 'booking_url' => $bookingId > 0 ? home_url('/my-account/bookings/' . $bookingId) : home_url('/'), |
| 1008 | + // Trip context for per-trip template selection (Pro overrides) and | |
| 1009 | + // for {{trip_id}}; "0" when the booking has no trip. | |
| 1010 | + 'trip_id' => (string) (int) ($booking->trip_id ?? 0), | |
| 1008 | 1011 | 'trip_name' => (string) ($booking->trip_title ?? ''), |
| 1009 | 1012 | 'trip_url' => !empty($booking->trip_slug) |
| 1010 | 1013 | ? home_url('/' . SettingsService::getTripBase() . '/' . rawurlencode((string) $booking->trip_slug) . '/') |
| 1011 | 1014 | : home_url('/'), |