| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?> |
| 2 |
<?php |
| 3 |
/** |
| 4 |
* @var \FluentCart\App\Models\Order $order |
| 5 |
* @var \FluentCart\App\Models\Subscription $subscription |
| 6 |
*/ |
| 7 |
?> |
| 8 |
|
| 9 |
<div class="space_bottom_30"> |
| 10 |
<p> |
| 11 |
<?php |
| 12 |
printf( |
| 13 |
/* translators: %s is the customer's full name */ |
| 14 |
esc_html__( 'Hello %s,', 'fluent-cart' ), |
| 15 |
esc_html($order->customer->full_name) |
| 16 |
); |
| 17 |
?> |
| 18 |
</p> |
| 19 |
|
| 20 |
<?php |
| 21 |
$dueDate = $order->getMeta('due_date'); |
| 22 |
$formattedDueDate = \FluentCart\App\Services\DateTime\DateFormatter::format($dueDate, false, $order); |
| 23 |
?> |
| 24 |
|
| 25 |
<p> |
| 26 |
<?php |
| 27 |
printf( |
| 28 |
/* translators: %s is the subscription item name */ |
| 29 |
esc_html__( 'Your upcoming renewal order for %s is ready.', 'fluent-cart' ), |
| 30 |
esc_html( $subscription->item_name ) |
| 31 |
); |
| 32 |
?> |
| 33 |
</p> |
| 34 |
|
| 35 |
<?php if ($formattedDueDate): ?> |
| 36 |
<p> |
| 37 |
<?php |
| 38 |
printf( |
| 39 |
/* translators: %s is the due date */ |
| 40 |
esc_html__( 'You can pay in advance at any time. Payment is due by %s.', 'fluent-cart' ), |
| 41 |
'<strong>' . esc_html( $formattedDueDate ) . '</strong>' |
| 42 |
); |
| 43 |
?> |
| 44 |
</p> |
| 45 |
<?php endif; ?> |
| 46 |
</div> |
| 47 |
|
| 48 |
<?php |
| 49 |
|
| 50 |
\FluentCart\App\App::make('view')->render('emails.parts.items_table', [ |
| 51 |
'order' => $order, |
| 52 |
'formattedItems' => $order->order_items, |
| 53 |
'heading' => __('Renewal Summary', 'fluent-cart'), |
| 54 |
]); |
| 55 |
|
| 56 |
echo '<hr />'; |
| 57 |
|
| 58 |
\FluentCart\App\App::make('view')->render('emails.parts.addresses', [ |
| 59 |
'order' => $order, |
| 60 |
]); |
| 61 |
|
| 62 |
\FluentCart\App\App::make('view')->render('emails.parts.call_to_action_box', [ |
| 63 |
'content' => $formattedDueDate |
| 64 |
? sprintf( |
| 65 |
/* translators: %s is the due date */ |
| 66 |
esc_html__( 'Your payment is due by %s. You can pay early — no need to wait until the due date.', 'fluent-cart' ), |
| 67 |
esc_html( $formattedDueDate ) |
| 68 |
) |
| 69 |
: esc_html__( 'You can pay at any time before the due date.', 'fluent-cart' ), |
| 70 |
'link' => \FluentCart\App\Services\Payments\PaymentHelper::getCustomPaymentLink($order->uuid), |
| 71 |
'button_text' => __('Pay Now', 'fluent-cart'), |
| 72 |
]); |
| 73 |
|