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