← All changes
|
app/Views/emails/order/reminder/overdue/customer.php
+10
-11
1.3.21
→
1.7.1
View file →
| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | $reminder = (isset($reminder) && is_array($reminder)) ? $reminder : []; |
| 9 | 9 | $dueAt = \FluentCart\Framework\Support\Arr::get($reminder, 'due_at', ''); |
| 10 | -$dueDate = $dueAt ? \FluentCart\App\Services\DateTime\DateTime::gmtToTimezone($dueAt)->format('M d, Y h:i A') : ''; | |
| 10 | +$dueDate = \FluentCart\App\Services\DateTime\DateFormatter::format($dueAt, true, $order); | |
| 11 | 11 | $dueAmount = \FluentCart\Framework\Support\Arr::get($reminder, 'due_amount', 0); |
| 12 | 12 | if (!$dueAmount) { |
| 13 | 13 | $dueAmount = max(((int)$order->total_amount - (int)$order->total_paid), 0); |
| 14 | 14 | } |
| @@ -17,8 +17,15 @@ | ||
| 17 | 17 | |
| 18 | 18 | if (empty($orderRef)) { |
| 19 | 19 | $orderRef = !empty($order->invoice_no) ? $order->invoice_no : '#' . $order->id; |
| 20 | 20 | } |
| 21 | + | |
| 22 | +$bodyText = sprintf( | |
| 23 | + /* translators: %1$s: invoice reference */ | |
| 24 | + esc_html__('This is a friendly reminder that your payment for invoice %1$s is still pending. You can complete it using the button below.', 'fluent-cart'), | |
| 25 | + '<b>' . esc_html($orderRef) . '</b>' | |
| 26 | +); | |
| 27 | +$ctaText = esc_html__('Complete your payment at your earliest convenience.', 'fluent-cart'); | |
| 21 | 28 | ?> |
| 22 | 29 | |
| 23 | 30 | <div class="space_bottom_30"> |
| 24 | 31 | <p> |
| @@ -29,17 +36,9 @@ | ||
| 29 | 36 | esc_html($order->customer->full_name) |
| 30 | 37 | ); |
| 31 | 38 | ?> |
| 32 | 39 | </p> |
| 33 | - <p> | |
| 34 | - <?php | |
| 35 | - printf( | |
| 36 | - /* translators: %s is order reference */ | |
| 37 | - esc_html__('This is a friendly reminder that your payment for order %s is still pending.', 'fluent-cart'), | |
| 38 | - esc_html($orderRef) | |
| 39 | - ); | |
| 40 | - ?> | |
| 41 | - </p> | |
| 40 | + <p><?php echo wp_kses($bodyText, ['b' => []]); ?></p> | |
| 42 | 41 | <table role="presentation" cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #e5e7eb;border-radius:8px;padding:14px 16px;margin:12px 0 0;"> |
| 43 | 42 | <tbody> |
| 44 | 43 | <tr> |
| 45 | 44 | <td style="font-size:13px;color:#6b7280;padding:0 0 6px;"><?php esc_html_e('Order ID', 'fluent-cart'); ?></td> |
| @@ -64,8 +63,8 @@ | ||
| 64 | 63 | </div> |
| 65 | 64 | |
| 66 | 65 | <?php |
| 67 | 66 | \FluentCart\App\App::make('view')->render('emails.parts.call_to_action_box', [ |
| 68 | - 'content' => __('Your order has an outstanding balance. Please complete your payment at your earliest convenience.', 'fluent-cart'), | |
| 67 | + 'content' => $ctaText, | |
| 69 | 68 | 'link' => $paymentLink, |
| 70 | 69 | 'button_text' => __('Complete Payment', 'fluent-cart'), |
| 71 | 70 | ]); |