| @@ -121,8 +121,9 @@ | ||
| 121 | 121 | |
| 122 | 122 | $templateData = [ |
| 123 | 123 | 'company_name' => SettingsService::get('company_name', get_bloginfo('name')), |
| 124 | 124 | 'company_address' => SettingsService::get('company_address', ''), |
| 125 | + 'company_address_lines' => \Yatra\Helpers\FormatHelper::companyAddressLines(), | |
| 125 | 126 | 'company_email' => SettingsService::get('company_email', get_option('admin_email')), |
| 126 | 127 | 'company_phone' => SettingsService::get('company_phone', ''), |
| 127 | 128 | 'customer_name' => $customerName, |
| 128 | 129 | 'customer_email' => (string) ($source['contact_email'] ?? $source['customer_email'] ?? ''), |
| @@ -133,9 +134,15 @@ | ||
| 133 | 134 | 'trip_title' => $trip ? ((string) ($trip->title ?? $tripFallbackTitle)) : $tripFallbackTitle, |
| 134 | 135 | 'trip_description'=> $trip ? (string) ($trip->description ?? $trip->content ?? '') : '', |
| 135 | 136 | // Duration is duration_days/duration_nights (no `duration` column). |
| 136 | 137 | 'trip_duration' => $trip |
| 137 | - ? yatra_format_duration((int) ($trip->duration_days ?? 0), isset($trip->duration_nights) ? (int) $trip->duration_nights : null) | |
| 138 | + ? yatra_format_duration( | |
| 139 | + (int) ($trip->duration_days ?? 0), | |
| 140 | + isset($trip->duration_nights) ? (int) $trip->duration_nights : null, | |
| 141 | + // Hour-based day tours: "8 hours" instead of "1 day". Absent | |
| 142 | + // or NULL on every day-based trip, which keeps its wording. | |
| 143 | + (int) ($trip->duration_hours ?? 0) | |
| 144 | + ) | |
| 138 | 145 | : '', |
| 139 | 146 | 'trip_difficulty' => $trip ? (string) ($trip->difficulty_name ?? '') : '', |
| 140 | 147 | 'trip_highlights' => $trip ? ($trip->highlights ?? $trip->trip_highlights ?? '') : '', |
| 141 | 148 | 'trip_includes' => $trip ? ($trip->includes ?? $trip->trip_includes ?? '') : '', |