| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Mail template for Subscription status changed (Admin). | |
| 3 | + * Mail template for Subscription cancelled (Customer). | |
| 4 | 4 | * |
| 5 | 5 | * @var string $email_heading Email Heading. |
| 6 | 6 | * @var int $id Subscription id. |
| 7 | 7 | * @var string $product_name Product name. |
| @@ -6,10 +6,17 @@ | ||
| 6 | 6 | * @var int $id Subscription id. |
| 7 | 7 | * @var string $product_name Product name. |
| 8 | 8 | * @var int $qty Subscription Quantity. |
| 9 | 9 | * @var string $amount Subscription Amount with price format. |
| 10 | + * @var string $view_subscription_url Subscription view URL. | |
| 11 | + * | |
| 12 | + * @package SpringDevs\Subscription | |
| 10 | 13 | */ |
| 11 | 14 | |
| 15 | +// Exit if accessed directly. | |
| 16 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 17 | + exit; | |
| 18 | +} | |
| 12 | 19 | ?> |
| 13 | 20 | |
| 14 | 21 | <?php do_action( 'woocommerce_email_header', $email_heading ); ?> |
| 15 | 22 | |
| @@ -15,44 +22,41 @@ | ||
| 15 | 22 | |
| 16 | 23 | <p> |
| 17 | 24 | <?php |
| 18 | 25 | // translators: <b></b> tag. |
| 19 | - echo wp_kses_post( sprintf( __( 'Your subscription is %1$s Cancelled! %2$s', 'sdevs_subscrpt' ), '<b>', '</b>' ) ); | |
| 26 | + echo wp_kses_post( sprintf( __( 'Your subscription is %1$s Cancelled! %2$s', 'subscription' ), '<b>', '</b>' ) ); | |
| 20 | 27 | ?> |
| 21 | 28 | </p> |
| 22 | 29 | |
| 23 | -<table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" border="1"> | |
| 30 | +<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;"> | |
| 24 | 31 | <tbody> |
| 32 | + <tr> | |
| 33 | + <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> | |
| 34 | + <td style="padding:10px 14px;text-align:left;vertical-align:top;color:#1d2327;"><?php echo esc_html( $id ); ?></td> | |
| 35 | + </tr> | |
| 36 | + <tr> | |
| 37 | + <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> | |
| 38 | + <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> | |
| 39 | + </tr> | |
| 40 | + <tr> | |
| 41 | + <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> | |
| 42 | + <td style="padding:10px 14px;text-align:left;vertical-align:top;color:#1d2327;border-top:1px solid #e3e3e8;"><?php echo esc_html( $qty ); ?></td> | |
| 43 | + </tr> | |
| 44 | + <tr> | |
| 45 | + <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> | |
| 46 | + <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> | |
| 47 | + </tr> | |
| 48 | + </tbody> | |
| 49 | +</table> | |
| 50 | + | |
| 51 | +<table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin:24px 0;"> | |
| 25 | 52 | <tr> |
| 26 | - <th scope="row" style="text-align:left; border: 1px solid #eee;"><?php esc_html_e( 'Subscription Id', 'sdevs_subscrpt' ); ?></th> | |
| 27 | - <td style="text-align:left; border: 1px solid #eee;"><?php echo esc_html( $id ); ?></td> | |
| 53 | + <td align="center"> | |
| 54 | + <a href="<?php echo esc_url( $view_subscription_url ); ?>" | |
| 55 | + style="display:inline-block;padding:12px 24px;background-color:#7f54b3;color:#ffffff;text-decoration:none;font-size:14px;font-weight:600;border-radius:4px;"> | |
| 56 | + <?php esc_html_e( 'View subscription', 'subscription' ); ?> | |
| 57 | + </a> | |
| 58 | + </td> | |
| 28 | 59 | </tr> |
| 29 | - <tr> | |
| 30 | - <th scope="row" style="text-align:left; border: 1px solid #eee;"><?php esc_html_e( 'Product', 'sdevs_subscrpt' ); ?></th> | |
| 31 | - <td style="text-align:left; border: 1px solid #eee;"><?php echo esc_html( $product_name ); ?></td> | |
| 32 | - </tr> | |
| 33 | - <tr> | |
| 34 | - <th scope="row" style="text-align:left; border: 1px solid #eee;"><?php esc_html_e( 'Qty', 'sdevs_subscrpt' ); ?></th> | |
| 35 | - <td style="text-align:left; border: 1px solid #eee;"><?php echo esc_html( $qty ); ?></td> | |
| 36 | - </tr> | |
| 37 | - <tr> | |
| 38 | - <th scope="row" style="text-align:left; border: 1px solid #eee;"><?php esc_html_e( 'Amount', 'sdevs_subscrpt' ); ?></th> | |
| 39 | - <td style="text-align:left; border: 1px solid #eee;"><?php echo wp_kses_post( $amount ); ?></td> | |
| 40 | - </tr> | |
| 41 | - </tbody> | |
| 42 | 60 | </table> |
| 43 | -<br> | |
| 44 | -<p> | |
| 45 | - <?php | |
| 46 | - echo wp_kses_post( | |
| 47 | - make_clickable( | |
| 48 | - sprintf( | |
| 49 | - // translators: subscription id. | |
| 50 | - __( 'You can view and edit this subscription in the dashboard here: %s', 'sdevs_subscrpt' ), | |
| 51 | - admin_url( 'post.php?post=' . $id . '&action=edit' ) | |
| 52 | - ) | |
| 53 | - ) | |
| 54 | - ); | |
| 55 | - ?> | |
| 56 | -</p> | |
| 57 | 61 | |
| 58 | 62 | <?php do_action( 'woocommerce_email_footer' ); ?> |