| 1 |
<?php |
| 2 |
/** |
| 3 |
* Mail template for Subscription renewal reminder (Customer). |
| 4 |
* |
| 5 |
* @var string $email_heading Email Heading. |
| 6 |
* @var int $id Subscription id. |
| 7 |
* @var string $product_name Product name. |
| 8 |
* @var int $qty Subscription Quantity. |
| 9 |
* @var string $amount Subscription Amount with price format. |
| 10 |
* @var string $view_subscription_url Subscription view URL. |
| 11 |
* @var int $num_of_days_before Number of days before. |
| 12 |
* |
| 13 |
* @package SpringDevs\Subscription |
| 14 |
*/ |
| 15 |
|
| 16 |
// Exit if accessed directly. |
| 17 |
if ( ! defined( 'ABSPATH' ) ) { |
| 18 |
exit; |
| 19 |
} |
| 20 |
?> |
| 21 |
|
| 22 |
<?php do_action( 'woocommerce_email_header', $email_heading ); ?> |
| 23 |
|
| 24 |
<p> |
| 25 |
<?php |
| 26 |
echo esc_html( |
| 27 |
sprintf( |
| 28 |
// translators: Number of days before & day|days. |
| 29 |
__( 'You have only %1$s %2$s left! Please renew the subscription before expired', 'subscription' ), |
| 30 |
$num_of_days_before, |
| 31 |
$num_of_days_before > 1 ? 'days' : 'day' |
| 32 |
) |
| 33 |
); |
| 34 |
?> |
| 35 |
</p> |
| 36 |
|
| 37 |
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;border-collapse:separate;border-spacing:0;border:1px solid #e3e3e8;border-radius:6px;overflow:hidden;font-family:'Helvetica Neue',Helvetica,Roboto,Arial,sans-serif;font-size:14px;"> |
| 38 |
<tbody> |
| 39 |
<tr> |
| 40 |
<th scope="row" style="width:40%;padding:10px 14px;text-align:left;vertical-align:top;font-weight:600;color:#50575e;background-color:#f6f7f7;"><?php esc_html_e( 'Subscription Id', 'subscription' ); ?></th> |
| 41 |
<td style="padding:10px 14px;text-align:left;vertical-align:top;color:#1d2327;"><?php echo esc_html( $id ); ?></td> |
| 42 |
</tr> |
| 43 |
<tr> |
| 44 |
<th scope="row" style="width:40%;padding:10px 14px;text-align:left;vertical-align:top;font-weight:600;color:#50575e;background-color:#f6f7f7;border-top:1px solid #e3e3e8;"><?php esc_html_e( 'Product', 'subscription' ); ?></th> |
| 45 |
<td style="padding:10px 14px;text-align:left;vertical-align:top;color:#1d2327;border-top:1px solid #e3e3e8;"><?php echo esc_html( $product_name ); ?></td> |
| 46 |
</tr> |
| 47 |
<tr> |
| 48 |
<th scope="row" style="width:40%;padding:10px 14px;text-align:left;vertical-align:top;font-weight:600;color:#50575e;background-color:#f6f7f7;border-top:1px solid #e3e3e8;"><?php esc_html_e( 'Qty', 'subscription' ); ?></th> |
| 49 |
<td style="padding:10px 14px;text-align:left;vertical-align:top;color:#1d2327;border-top:1px solid #e3e3e8;"><?php echo esc_html( $qty ); ?></td> |
| 50 |
</tr> |
| 51 |
<tr> |
| 52 |
<th scope="row" style="width:40%;padding:10px 14px;text-align:left;vertical-align:top;font-weight:600;color:#50575e;background-color:#f6f7f7;border-top:1px solid #e3e3e8;"><?php esc_html_e( 'Amount', 'subscription' ); ?></th> |
| 53 |
<td style="padding:10px 14px;text-align:left;vertical-align:top;color:#1d2327;border-top:1px solid #e3e3e8;"><?php echo wp_kses_post( $amount ); ?></td> |
| 54 |
</tr> |
| 55 |
</tbody> |
| 56 |
</table> |
| 57 |
|
| 58 |
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin:24px 0;"> |
| 59 |
<tr> |
| 60 |
<td align="center"> |
| 61 |
<a href="<?php echo esc_url( $view_subscription_url ); ?>" |
| 62 |
style="display:inline-block;padding:12px 24px;background-color:#7f54b3;color:#ffffff;text-decoration:none;font-size:14px;font-weight:600;border-radius:4px;"> |
| 63 |
<?php esc_html_e( 'View subscription', 'subscription' ); ?> |
| 64 |
</a> |
| 65 |
</td> |
| 66 |
</tr> |
| 67 |
</table> |
| 68 |
|
| 69 |
<?php do_action( 'woocommerce_email_footer' ); ?> |
| 70 |
|