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 | templates/partials/availability-card.php +13 -3 3.0.13 → 3.0.16 View file →
@@ -206,15 +206,15 @@
206 206 <div class="yatra-card-header-sub"><?php esc_html_e('per departure', 'yatra'); ?></div>
207 207 </div>
208 208
209 209 <!-- Price (sale only; struck original + % badge sit in .yatra-card-badges-container with status) -->
210 - <div class="yatra-card-header-price">
210 + <div class="yatra-card-header-price" data-price-unit="<?php echo esc_attr($card['price_unit'] ?? 'per_person'); ?>">
211 211 <div class="yatra-card-price-group yatra-card-price-group--stack">
212 212 <?php
213 213 echo '<span class="yatra-sale-price">' . yatra_format_price($display_sale_price) . '</span>';
214 214 ?>
215 215 </div>
216 - <span class="yatra-price-label"><?php echo esc_html__('per person', 'yatra'); ?></span>
216 + <span class="yatra-price-label"><?php echo esc_html($card['price_unit_label'] ?? __('per person', 'yatra')); ?></span>
217 217 </div>
218 218
219 219 <!-- Toggle Arrow -->
220 220 <div class="yatra-card-header-arrow">
@@ -239,9 +239,19 @@
239 239 <?php
240 240 // Prefer the per-card span (matches this card's departure/return
241 241 // dates); fall back to the trip default for sample cards.
242 242 $duration_days = (int) ($card['duration_days'] ?? $trip_data->duration_days ?? 1);
243 - echo esc_html($duration_days . ' ' . _n('Day', 'Days', $duration_days, 'yatra'));
243 + $duration_hours = (int) ($trip_data->duration_hours ?? 0);
244 + if ($duration_hours > 0) {
245 + // Hour-based day tour: "8 Hours", not "1 Day".
246 + echo esc_html(sprintf(
247 + /* translators: %d: number of hours. */
248 + _n('%d Hour', '%d Hours', $duration_hours, 'yatra'),
249 + $duration_hours
250 + ));
251 + } else {
252 + echo esc_html($duration_days . ' ' . _n('Day', 'Days', $duration_days, 'yatra'));
253 + }
244 254 ?>
245 255 </div>
246 256 </div>
247 257 </div>