| @@ -52,8 +52,21 @@ | ||
| 52 | 52 | ) |
| 53 | 53 | ); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | + if ($templateKey === 'account_email_change_request') { | |
| 57 | + $vars['new_email'] = '[email protected]'; | |
| 58 | + $vars['verification_link'] = home_url('/?yatra_email_token=preview-change-token'); | |
| 59 | + $vars['intro_paragraph'] = __('You recently requested to change the email address on your account. To confirm this new address, click the button below.', 'yatra'); | |
| 60 | + $vars['footer_note'] = __('If you did not request this change, you can safely ignore this email — your address will not change.', 'yatra'); | |
| 61 | + } | |
| 62 | + | |
| 63 | + if ($templateKey === 'account_email_changed') { | |
| 64 | + $vars['new_email'] = '[email protected]'; | |
| 65 | + $vars['intro_paragraph'] = __('The email address on your account was just changed. If this was you, no further action is needed.', 'yatra'); | |
| 66 | + $vars['footer_note'] = __('If you did not make this change, please contact us immediately.', 'yatra'); | |
| 67 | + } | |
| 68 | + | |
| 56 | 69 | /** @var array<string, string> $filtered */ |
| 57 | 70 | $filtered = apply_filters('yatra_email_template_preview_variables', $vars, $templateKey, $tripId); |
| 58 | 71 | |
| 59 | 72 | return TransactionalEmailTemplateService::mergeTemplateVariables($filtered); |
| @@ -72,8 +85,9 @@ | ||
| 72 | 85 | 'customer_name' => __('Alex Traveler', 'yatra'), |
| 73 | 86 | 'customer_first_name' => 'Alex', |
| 74 | 87 | 'customer_last_name' => __('Traveler', 'yatra'), |
| 75 | 88 | 'customer_email' => '[email protected]', |
| 89 | + 'new_email' => '[email protected]', | |
| 76 | 90 | 'customer_phone' => '+1 555 0100', |
| 77 | 91 | 'booking_reference' => 'YTR-PREVIEW-001', |
| 78 | 92 | 'booking_id' => '42', |
| 79 | 93 | 'trip_id' => '101', |