PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.6
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.6
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
fluent-cart / app / Views / emails / subscription / trial_end / admin.php

admin.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.6.6, at app/Views/emails/subscription/trial_end/admin.php

66 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 $trialEndDate = \FluentCart\Framework\Support\Arr::get($reminder, 'trial_end_date',
11 !empty($subscription->trial_ends_at) ? $subscription->trial_ends_at : $subscription->next_billing_date
12 );
13 $trialEndLabel = \FluentCart\App\Services\DateTime\DateFormatter::format($trialEndDate, true, $order);
14 $stage = \FluentCart\Framework\Support\Arr::get($reminder, 'stage', '');
15 $daysBefore = preg_replace('/[^0-9]/', '', $stage);
16 $daysText = !empty($daysBefore) ? sprintf(__('%d days', 'fluent-cart'), $daysBefore) : '';
17 $renewalAmount = $subscription->recurring_total ?? 0;
18 $billingInterval = $subscription->billing_interval ?? '';
19 ?>
20
21 <div class="space_bottom_30">
22 <p><?php esc_html_e('A trial end reminder was sent to a customer.', 'fluent-cart'); ?></p>
23 <table role="presentation" cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #e5e7eb;border-radius:8px;padding:14px 16px;margin:12px 0 0;">
24 <tbody>
25 <tr>
26 <td style="font-size:13px;color:#6b7280;padding:0 0 6px;"><?php esc_html_e('Customer', 'fluent-cart'); ?></td>
27 <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>
28 </tr>
29 <tr>
30 <td style="font-size:13px;color:#6b7280;padding:0 0 6px;"><?php esc_html_e('Subscription', 'fluent-cart'); ?></td>
31 <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>
32 </tr>
33 <?php if ($daysText): ?>
34 <tr>
35 <td style="font-size:13px;color:#6b7280;padding:0 0 6px;"><?php esc_html_e('Trial Ends In', 'fluent-cart'); ?></td>
36 <td style="font-size:13px;color:#111827;font-weight:600;padding:0 0 6px;text-align:right;"><?php echo esc_html($daysText); ?></td>
37 </tr>
38 <?php endif; ?>
39 <?php if ($trialEndLabel): ?>
40 <tr>
41 <td style="font-size:13px;color:#6b7280;padding:0 0 6px;"><?php esc_html_e('Trial End Date', 'fluent-cart'); ?></td>
42 <td style="font-size:13px;color:#111827;font-weight:600;padding:0 0 6px;text-align:right;"><?php echo esc_html($trialEndLabel); ?></td>
43 </tr>
44 <?php endif; ?>
45 <?php if ($renewalAmount): ?>
46 <tr>
47 <td style="font-size:13px;color:#6b7280;padding:0;"><?php esc_html_e('Amount After Trial', 'fluent-cart'); ?></td>
48 <td style="font-size:14px;color:#111827;font-weight:700;padding:0;text-align:right;">
49 <?php echo esc_html(\FluentCart\Api\CurrencySettings::getFormattedPrice($renewalAmount, null, false, true, true)); ?>
50 <?php if ($billingInterval): ?>
51 <span style="font-size:12px;font-weight:400;color:#6b7280;">(<?php echo esc_html($billingInterval); ?>)</span>
52 <?php endif; ?>
53 </td>
54 </tr>
55 <?php endif; ?>
56 </tbody>
57 </table>
58 </div>
59
60 <?php
61 \FluentCart\App\App::make('view')->render('emails.parts.call_to_action_box', [
62 'content' => __('You can review subscription details and take action if needed from the admin dashboard.', 'fluent-cart'),
63 'link' => $subscription->getViewUrl('admin'),
64 'button_text' => __('View Subscription', 'fluent-cart'),
65 ]);
66