| 1 |
<?php if (!defined('ABSPATH')) exit; ?> |
| 2 |
<?php |
| 3 |
/** |
| 4 |
* @var \FluentCart\App\Models\Subscription $subscription |
| 5 |
* @var \FluentCart\App\Models\Order $order |
| 6 |
* @var array $reminder |
| 7 |
*/ |
| 8 |
|
| 9 |
$reminder = (isset($reminder) && is_array($reminder)) ? $reminder : []; |
| 10 |
$billingDate = \FluentCart\Framework\Support\Arr::get($reminder, 'billing_date', $subscription->next_billing_date); |
| 11 |
$billingLabel = \FluentCart\App\Services\DateTime\DateFormatter::format($billingDate, true, $order); |
| 12 |
$renewalAmount = $subscription->recurring_total ?? 0; |
| 13 |
$billingInterval = $subscription->billing_interval ?? ''; |
| 14 |
?> |
| 15 |
|
| 16 |
<div class="space_bottom_30"> |
| 17 |
<p><?php esc_html_e('A subscription renewal reminder was sent to a customer.', 'fluent-cart'); ?></p> |
| 18 |
<table role="presentation" cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #e5e7eb;border-radius:8px;padding:14px 16px;margin:12px 0 0;"> |
| 19 |
<tbody> |
| 20 |
<tr> |
| 21 |
<td style="font-size:13px;color:#6b7280;padding:0 0 6px;"><?php esc_html_e('Customer', 'fluent-cart'); ?></td> |
| 22 |
<td style="font-size:13px;color:#111827;font-weight:600;padding:0 0 6px;text-align:right;"><?php echo esc_html($subscription->customer->full_name); ?></td> |
| 23 |
</tr> |
| 24 |
<tr> |
| 25 |
<td style="font-size:13px;color:#6b7280;padding:0 0 6px;"><?php esc_html_e('Subscription', 'fluent-cart'); ?></td> |
| 26 |
<td style="font-size:13px;color:#111827;font-weight:600;padding:0 0 6px;text-align:right;"><?php echo esc_html($subscription->display_item_name); ?></td> |
| 27 |
</tr> |
| 28 |
<?php if ($renewalAmount): ?> |
| 29 |
<tr> |
| 30 |
<td style="font-size:13px;color:#6b7280;padding:0 0 6px;"><?php esc_html_e('Renewal Amount', 'fluent-cart'); ?></td> |
| 31 |
<td style="font-size:14px;color:#111827;font-weight:700;padding:0 0 6px;text-align:right;"> |
| 32 |
<?php echo esc_html(\FluentCart\Api\CurrencySettings::getFormattedPrice($renewalAmount, null, false, true, true)); ?> |
| 33 |
<?php if ($billingInterval): ?> |
| 34 |
<span style="font-size:12px;font-weight:400;color:#6b7280;">(<?php echo esc_html($billingInterval); ?>)</span> |
| 35 |
<?php endif; ?> |
| 36 |
</td> |
| 37 |
</tr> |
| 38 |
<?php endif; ?> |
| 39 |
<?php if ($billingLabel): ?> |
| 40 |
<tr> |
| 41 |
<td style="font-size:13px;color:#6b7280;padding:0;"><?php esc_html_e('Next Billing Date', 'fluent-cart'); ?></td> |
| 42 |
<td style="font-size:13px;color:#111827;font-weight:600;padding:0;text-align:right;"><?php echo esc_html($billingLabel); ?></td> |
| 43 |
</tr> |
| 44 |
<?php endif; ?> |
| 45 |
</tbody> |
| 46 |
</table> |
| 47 |
</div> |
| 48 |
|
| 49 |
<?php |
| 50 |
\FluentCart\App\App::make('view')->render('emails.parts.call_to_action_box', [ |
| 51 |
'content' => __('You can review subscription details from the admin dashboard.', 'fluent-cart'), |
| 52 |
'link' => $subscription->getViewUrl('admin'), |
| 53 |
'button_text' => __('View Subscription', 'fluent-cart'), |
| 54 |
]); |
| 55 |
|