| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?> |
| 2 |
<?php |
| 3 |
/** |
| 4 |
* Billing period skipped notice — sent when an admin skips the customer's next |
| 5 |
* billing period. Neutral by design: the internal reason and the admin who |
| 6 |
* skipped are audit-only and are never included here. |
| 7 |
* |
| 8 |
* @var \FluentCart\App\Models\Subscription $subscription |
| 9 |
* @var \FluentCart\App\Models\Order $order Parent order |
| 10 |
*/ |
| 11 |
|
| 12 |
$manageUrl = (new \FluentCart\Api\StoreSettings())->getCustomerProfilePage() |
| 13 |
? \FluentCart\App\Services\URL::getCustomerDashboardUrl('subscription/' . $subscription->uuid) |
| 14 |
: ''; |
| 15 |
|
| 16 |
$formattedResumeDate = $subscription->next_billing_date |
| 17 |
? \FluentCart\App\Services\DateTime\DateTime::gmtToTimezone($subscription->next_billing_date)->format(get_option('date_format')) |
| 18 |
: ''; |
| 19 |
?> |
| 20 |
|
| 21 |
<div class="space_bottom_30"> |
| 22 |
<p> |
| 23 |
<?php |
| 24 |
printf( |
| 25 |
/* translators: %1$s is the customer's full name */ |
| 26 |
esc_html__( 'Hello %1$s,', 'fluent-cart' ), |
| 27 |
esc_html($order->customer->full_name) |
| 28 |
); |
| 29 |
?> |
| 30 |
</p> |
| 31 |
|
| 32 |
<p> |
| 33 |
<?php |
| 34 |
if ($formattedResumeDate) { |
| 35 |
printf( |
| 36 |
/* translators: %1$s is the subscription item name, %2$s is the date billing resumes */ |
| 37 |
esc_html__( 'Good news — your upcoming payment for %1$s has been skipped. Your billing resumes on %2$s.', 'fluent-cart' ), |
| 38 |
'<strong>' . esc_html( $subscription->item_name ) . '</strong>', |
| 39 |
'<strong>' . esc_html( $formattedResumeDate ) . '</strong>' |
| 40 |
); |
| 41 |
} else { |
| 42 |
printf( |
| 43 |
/* translators: %1$s is the subscription item name */ |
| 44 |
esc_html__( 'Good news — your upcoming payment for %1$s has been skipped.', 'fluent-cart' ), |
| 45 |
'<strong>' . esc_html( $subscription->item_name ) . '</strong>' |
| 46 |
); |
| 47 |
} |
| 48 |
?> |
| 49 |
</p> |
| 50 |
|
| 51 |
<p> |
| 52 |
<?php esc_html_e( 'No action is needed on your part.', 'fluent-cart' ); ?> |
| 53 |
</p> |
| 54 |
</div> |
| 55 |
|
| 56 |
<?php |
| 57 |
if ($manageUrl) { |
| 58 |
\FluentCart\App\App::make('view')->render('emails.parts.call_to_action_box', [ |
| 59 |
'content' => esc_html__( 'You can review your subscription any time from your account.', 'fluent-cart' ), |
| 60 |
'link' => $manageUrl, |
| 61 |
'button_text' => __('Manage Subscription', 'fluent-cart'), |
| 62 |
]); |
| 63 |
} |
| 64 |
|