| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?> |
| 2 |
<?php |
| 3 |
/** |
| 4 |
* @var \FluentCart\App\Models\Subscription $subscription |
| 5 |
* @var \FluentCart\App\Models\Order $order |
| 6 |
*/ |
| 7 |
|
| 8 |
$transaction = $subscription->getLatestTransaction(); |
| 9 |
$celebration = \FluentCart\App\Services\TemplateService::getCelebration('renewal'); |
| 10 |
?> |
| 11 |
|
| 12 |
<?php |
| 13 |
if (!empty($celebration)) { |
| 14 |
\FluentCart\App\App::make('view')->render('emails.parts.celebration', [ |
| 15 |
'text' => $celebration |
| 16 |
]); |
| 17 |
} |
| 18 |
?> |
| 19 |
|
| 20 |
<div class="space_bottom_30"> |
| 21 |
<p><?php echo esc_html__('Hey There 👋,', 'fluent-cart'); ?></p> |
| 22 |
<p><?php |
| 23 |
printf( |
| 24 |
/* translators: %1$s is the customer name, %2$s is the subscription item name */ |
| 25 |
esc_html__('%1$s just renewed their subscription: %2$s.', 'fluent-cart'), |
| 26 |
esc_html($subscription->customer->full_name), |
| 27 |
'<b>' . esc_html($subscription->item_name) . '</b>' |
| 28 |
); |
| 29 |
?></p> |
| 30 |
</div> |
| 31 |
|
| 32 |
<div class="space_bottom_30"> |
| 33 |
<p><b><?php esc_html_e('Subscription Renewal Summary:', 'fluent-cart'); ?></b></p> |
| 34 |
<p><?php esc_html_e('Renewal Date:', 'fluent-cart'); ?> <b><?php echo esc_html($transaction->created_at->format('d M Y, H:i')); ?></b></p> |
| 35 |
<p><?php esc_html_e('Renewal Amount 💰:', 'fluent-cart'); ?> <b><?php echo esc_html(\FluentCart\App\Helpers\Helper::toDecimal($transaction->total)); ?></b></p> |
| 36 |
<p><?php esc_html_e('Payment Method:', 'fluent-cart'); ?> <b><?php echo esc_html($transaction->getPaymentMethodText()); ?></b></p> |
| 37 |
<p><?php esc_html_e('Vendor Transaction ID:', 'fluent-cart'); ?> <b><?php echo esc_html($transaction->vendor_charge_id); ?></b></p> |
| 38 |
</div> |
| 39 |
|
| 40 |
|
| 41 |
<?php |
| 42 |
\FluentCart\App\App::make('view')->render('emails.parts.call_to_action_box', [ |
| 43 |
'content' => esc_html__('Want to see more details about this renewal? You can view the order details page for more information.', 'fluent-cart'), |
| 44 |
'link' => $transaction->order->getViewUrl('admin'), |
| 45 |
'button_text' => __('View Details', 'fluent-cart'), |
| 46 |
]); |
| 47 |
?> |
| 48 |
|