| @@ -224,18 +224,19 @@ | ||
| 224 | 224 | $unit_price = $cost['price'] ?? 0; |
| 225 | 225 | $total_cost = $unit_price * $quantity; |
| 226 | 226 | ?> |
| 227 | 227 | <span class="yatra-price-tooltip" title="<?php |
| 228 | - // Build tooltip data with proper escaping and currency symbol | |
| 229 | - $currency_symbol = $checkout->getCurrencySymbol(); | |
| 230 | - $unit_price_formatted = number_format($unit_price, 2); | |
| 231 | - $total_cost_formatted = number_format($total_cost, 2); | |
| 232 | - $tooltip_text = sprintf('%s%s × %d travelers = %s%s', | |
| 233 | - $currency_symbol, | |
| 234 | - $unit_price_formatted, | |
| 235 | - (int) $quantity, | |
| 236 | - $currency_symbol, | |
| 237 | - $total_cost_formatted | |
| 228 | + // Tooltip: unit price × travelers = line total. Formatted | |
| 229 | + // through the canonical formatter so decimals, separators | |
| 230 | + // and currency symbol match the rest of the site (single | |
| 231 | + // source of truth). zero_is_unknown=false so a 0 line | |
| 232 | + // renders as a number, not "Contact for pricing". | |
| 233 | + $tooltip_text = sprintf( | |
| 234 | + /* translators: 1: formatted unit price, 2: number of travelers, 3: formatted line total */ | |
| 235 | + __('%1$s × %2$d travelers = %3$s', 'yatra'), | |
| 236 | + yatra_format_price($unit_price, null, false), | |
| 237 | + (int) $quantity, | |
| 238 | + yatra_format_price($total_cost, null, false) | |
| 238 | 239 | ); |
| 239 | 240 | echo esc_attr($tooltip_text); |
| 240 | 241 | ?>"> |
| 241 | 242 | <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="opacity: 0.6; cursor: help;"> |