| @@ -31,8 +31,11 @@ | ||
| 31 | 31 | 'has_discount' => $displayPricing['has_discount'], |
| 32 | 32 | 'raw_current_price' => $displayPricing['effective_price_min'], |
| 33 | 33 | 'raw_original_price' => $displayPricing['min_category_original_price'], |
| 34 | 34 | 'is_traveler_based' => $displayPricing['has_traveler_pricing'], |
| 35 | + // "per person" / "per group (1-2 pax)" — follows the category the shown price comes from | |
| 36 | + 'price_unit' => $displayPricing['price_unit'] ?? 'per_person', | |
| 37 | + 'price_unit_label' => $displayPricing['price_unit_label'] ?? __('per person', 'yatra'), | |
| 35 | 38 | ]; |
| 36 | 39 | |
| 37 | 40 | $discount = [ |
| 38 | 41 | 'has_discount' => $displayPricing['has_discount'] && $displayPricing['max_discount_percentage'] > 0, |
| @@ -80,9 +83,9 @@ | ||
| 80 | 83 | <?php if ($pricing['has_discount'] && !empty($pricing['original_price']) && $show_strike_original_sidebar): ?> |
| 81 | 84 | <span class="yatra-booking-price-original"><?php echo esc_html($pricing['original_price']); ?></span> |
| 82 | 85 | <?php endif; ?> |
| 83 | 86 | <span class="yatra-booking-price-amount" id="display-price"><?php echo esc_html($pricing['current_price']); ?></span> |
| 84 | - <span class="yatra-booking-price-label"><?php echo esc_html__('per person', 'yatra'); ?></span> | |
| 87 | + <span class="yatra-booking-price-label" data-price-unit="<?php echo esc_attr($pricing['price_unit']); ?>"><?php echo esc_html($pricing['price_unit_label']); ?></span> | |
| 85 | 88 | <?php if (!empty($yatra_sidebar_urgency)) : ?> |
| 86 | 89 | <?php foreach ($yatra_sidebar_urgency as $yatra_sb_urg) : ?> |
| 87 | 90 | <div class="yatra-booking-dp-urgency" style="background-color:#fef3c7;color:#92400e;padding:6px 8px;border-radius:6px;margin-top:8px;font-size:12px;line-height:1.35;"> |
| 88 | 91 | <?php echo esc_html((string) $yatra_sb_urg); ?> |
| @@ -144,9 +147,9 @@ | ||
| 144 | 147 | <?php if ($pricing['has_discount'] && !empty($pricing['original_price']) && $show_strike_original_sidebar): ?> |
| 145 | 148 | <span class="yatra-booking-price-original"><?php echo esc_html($pricing['original_price']); ?></span> |
| 146 | 149 | <?php endif; ?> |
| 147 | 150 | <span class="yatra-booking-price-amount" id="display-price"><?php echo esc_html($pricing['current_price']); ?></span> |
| 148 | - <span class="yatra-booking-price-label"><?php echo esc_html__('per person', 'yatra'); ?></span> | |
| 151 | + <span class="yatra-booking-price-label" data-price-unit="<?php echo esc_attr($pricing['price_unit']); ?>"><?php echo esc_html($pricing['price_unit_label']); ?></span> | |
| 149 | 152 | <?php if (!empty($yatra_sidebar_urgency)) : ?> |
| 150 | 153 | <?php foreach ($yatra_sidebar_urgency as $yatra_sb_urg) : ?> |
| 151 | 154 | <div class="yatra-booking-dp-urgency" style="background-color:#fef3c7;color:#92400e;padding:6px 8px;border-radius:6px;margin-top:8px;font-size:12px;line-height:1.35;"> |
| 152 | 155 | <?php echo esc_html((string) $yatra_sb_urg); ?> |