Kadence WooCommerce Email Designer - Version 1.3.11

Version Description

  • Update: Add Classes to order totals table so it's possible to style specifically.
  • Update: Add Classes to email body so you can add styles that only effect certain emails.
  • Add: Option to Customer Payment Retry email to make payment link a button.
  • Add: Option to Customer Payment Retry email to use {invoice_pay_link} placeholder in content.
  • Add: Option to edit Store manager Payment Retry email.
  • Update: Add {customer_email} placeholder.
  • Update: get_product to wc_get_product - thanks @dustinpitcher
Download this release

Release Info

Developer britner
Plugin Icon 128x128 Kadence WooCommerce Email Designer
Version 1.3.11
Comparing to
See all releases

Code changes from version 1.3.9 to 1.3.11

includes/class-kadence-woomail-preview.php CHANGED
@@ -43,6 +43,7 @@ if ( ! class_exists( 'Kadence_Woomail_Preview' ) ) {
43
  'customer_completed_switch_order' => 'WCS_Email_Completed_Switch_Order',
44
  'customer_renewal_invoice' => 'WCS_Email_Customer_Renewal_Invoice',
45
  'customer_payment_retry' => 'WCS_Email_Customer_Payment_Retry',
 
46
  'cancelled_subscription' => 'WCS_Email_Cancelled_Subscription',
47
  // Woocommerce Memberships.
48
  'WC_Memberships_User_Membership_Note_Email' => 'WC_Memberships_User_Membership_Note_Email',
@@ -109,6 +110,7 @@ if ( ! class_exists( 'Kadence_Woomail_Preview' ) ) {
109
  'customer_completed_switch_order' => 'completed',
110
  'customer_renewal_invoice' => 'failed',
111
  'customer_payment_retry' => 'pending',
 
112
  'cancelled_subscription' => 'cancelled',
113
  // Woocommerce Memberships.
114
  'WC_Memberships_User_Membership_Note_Email' => 'completed',
@@ -477,6 +479,30 @@ if ( ! class_exists( 'Kadence_Woomail_Preview' ) ) {
477
  $email->object = 'retry';
478
  }
479
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
480
  /**
481
  * WooCommerce Membership.
482
  */
@@ -610,7 +636,7 @@ if ( ! class_exists( 'Kadence_Woomail_Preview' ) ) {
610
  * WooCommerce Wait-list Plugin (from WooCommerce).
611
  */
612
  case 'woocommerce_waitlist_mailout':
613
- $email->object = get_product( $product_id );
614
  $email->find[] = '{product_title}';
615
  $email->replace[] = $email->object->get_title();
616
  self::$current_product_title = $email->object->get_title();
43
  'customer_completed_switch_order' => 'WCS_Email_Completed_Switch_Order',
44
  'customer_renewal_invoice' => 'WCS_Email_Customer_Renewal_Invoice',
45
  'customer_payment_retry' => 'WCS_Email_Customer_Payment_Retry',
46
+ 'admin_payment_retry' => 'WCS_Email_Payment_Retry',
47
  'cancelled_subscription' => 'WCS_Email_Cancelled_Subscription',
48
  // Woocommerce Memberships.
49
  'WC_Memberships_User_Membership_Note_Email' => 'WC_Memberships_User_Membership_Note_Email',
110
  'customer_completed_switch_order' => 'completed',
111
  'customer_renewal_invoice' => 'failed',
112
  'customer_payment_retry' => 'pending',
113
+ 'admin_payment_retry' => 'pending',
114
  'cancelled_subscription' => 'cancelled',
115
  // Woocommerce Memberships.
116
  'WC_Memberships_User_Membership_Note_Email' => 'completed',
479
  $email->object = 'retry';
480
  }
481
  break;
482
+ case 'admin_payment_retry':
483
+ $email->object = $order;
484
+ $email->find['order-date'] = '{order_date}';
485
+ $email->find['order-number'] = '{order_number}';
486
+ $email->replace['order-date'] = wc_format_datetime( $email->object->get_date_created() );
487
+ $email->replace['order-number'] = $email->object->get_order_number();
488
+ // Other properties.
489
+ if ( ! empty( $preview_id ) && 'mockup' != $preview_id ) {
490
+ if ( WCS_Retry_Manager::is_retry_enabled() ) {
491
+ $retry = WCS_Retry_Manager::store()->get_last_retry_for_order( $preview_id );
492
+ if ( ! empty( $retry ) && is_object( $retry ) ) {
493
+ $email->retry = $retry;
494
+ $email->find['retry_time'] = '{retry_time}';
495
+ $email->replace['retry_time'] = wcs_get_human_time_diff( $email->retry->get_time() );
496
+ } else {
497
+ $email->object = 'retry';
498
+ }
499
+ } else {
500
+ $email->object = 'retry';
501
+ }
502
+ } else {
503
+ $email->object = 'retry';
504
+ }
505
+ break;
506
  /**
507
  * WooCommerce Membership.
508
  */
636
  * WooCommerce Wait-list Plugin (from WooCommerce).
637
  */
638
  case 'woocommerce_waitlist_mailout':
639
+ $email->object = wc_get_product( $product_id );
640
  $email->find[] = '{product_title}';
641
  $email->replace[] = $email->object->get_title();
642
  self::$current_product_title = $email->object->get_title();
includes/class-kadence-woomail-settings.php CHANGED
@@ -129,6 +129,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
129
  'customer_renewal_invoice' => 'Customer Renewal Invoice',
130
  'cancelled_subscription' => 'Cancelled Subscription',
131
  'customer_payment_retry' => 'Customer Payment Retry',
 
132
  );
133
 
134
  /**
@@ -852,7 +853,49 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
852
  ),
853
  );
854
  } else if ( 'customer_payment_retry' == $key ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
855
  // Button Switch.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
856
  $extra_email_text[ $key . '_override' ] = array(
857
  'title' => __( 'Override Static Email Content with Custom Body Text?', 'kadence-woocommerce-email-designer' ),
858
  'control_type' => 'toggleswitch',
@@ -866,7 +909,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
866
  'value' => $key,
867
  ),
868
  );
869
- // Email Body Text
870
  $extra_email_text[ $key . '_body' ] = array(
871
  'title' => __( 'Body Text', 'kadence-woocommerce-email-designer' ),
872
  'type' => 'textarea',
@@ -2808,6 +2851,11 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
2808
  'customer_payment_retry_subject' => __( 'Automatic payment failed for {order_number}, we will retry {retry_time}', 'kadence-woocommerce-email-designer' ),
2809
  'customer_payment_retry_body' => '',
2810
  'customer_payment_retry_override' => false,
 
 
 
 
 
2811
  'new_order_heading' => __( 'New customer order', 'kadence-woocommerce-email-designer' ),
2812
  'cancelled_order_heading' => __( 'Cancelled order', 'kadence-woocommerce-email-designer' ),
2813
  'customer_processing_order_heading' => __( 'Thank you for your order', 'kadence-woocommerce-email-designer' ),
129
  'customer_renewal_invoice' => 'Customer Renewal Invoice',
130
  'cancelled_subscription' => 'Cancelled Subscription',
131
  'customer_payment_retry' => 'Customer Payment Retry',
132
+ 'admin_payment_retry' => 'Payment Retry',
133
  );
134
 
135
  /**
853
  ),
854
  );
855
  } else if ( 'customer_payment_retry' == $key ) {
856
+ // Override content.
857
+ $extra_email_text[ $key . '_override' ] = array(
858
+ 'title' => __( 'Override Static Email Content with Custom Body Text?', 'kadence-woocommerce-email-designer' ),
859
+ 'control_type' => 'toggleswitch',
860
+ 'section' => 'mtype',
861
+ 'transport' => 'refresh',
862
+ 'default' => self::get_default_value( $key . '_override' ),
863
+ 'original' => '',
864
+ 'active_callback' => array(
865
+ 'id' => 'email_type',
866
+ 'compare' => '==',
867
+ 'value' => $key,
868
+ ),
869
+ );
870
  // Button Switch.
871
+ $extra_email_text[ $key . '_btn_switch' ] = array(
872
+ 'title' => __( 'Make "Pay now" a button', 'kadence-woocommerce-email-designer' ),
873
+ 'control_type' => 'toggleswitch',
874
+ 'section' => 'mtype',
875
+ 'transport' => 'refresh',
876
+ 'default' => self::get_default_value( $key . '_btn_switch' ),
877
+ 'original' => '',
878
+ 'active_callback' => array(
879
+ 'id' => 'email_type',
880
+ 'compare' => '==',
881
+ 'value' => $key,
882
+ ),
883
+ );
884
+ // Email Body Text.
885
+ $extra_email_text[ $key . '_body' ] = array(
886
+ 'title' => __( 'Body Text', 'kadence-woocommerce-email-designer' ),
887
+ 'type' => 'textarea',
888
+ 'section' => 'mtype',
889
+ 'default' => self::get_default_value( $key . '_body' ),
890
+ 'original' => '',
891
+ 'active_callback' => array(
892
+ 'id' => 'email_type',
893
+ 'compare' => '==',
894
+ 'value' => $key,
895
+ ),
896
+ );
897
+ } else if ( 'admin_payment_retry' == $key ) {
898
+ // Override content.
899
  $extra_email_text[ $key . '_override' ] = array(
900
  'title' => __( 'Override Static Email Content with Custom Body Text?', 'kadence-woocommerce-email-designer' ),
901
  'control_type' => 'toggleswitch',
909
  'value' => $key,
910
  ),
911
  );
912
+ // Email Body Text.
913
  $extra_email_text[ $key . '_body' ] = array(
914
  'title' => __( 'Body Text', 'kadence-woocommerce-email-designer' ),
915
  'type' => 'textarea',
2851
  'customer_payment_retry_subject' => __( 'Automatic payment failed for {order_number}, we will retry {retry_time}', 'kadence-woocommerce-email-designer' ),
2852
  'customer_payment_retry_body' => '',
2853
  'customer_payment_retry_override' => false,
2854
+ 'customer_payment_retry_btn_switch' => false,
2855
+ 'admin_payment_retry_heading' => __( 'Automatic renewal payment failed', 'kadence-woocommerce-email-designer' ),
2856
+ 'admin_payment_retry_subject' => __( '[{site_title}] Automatic payment failed for {order_number}, retry scheduled to run {retry_time}', 'kadence-woocommerce-email-designer' ),
2857
+ 'admin_payment_retry_body' => '',
2858
+ 'admin_payment_retry_override' => false,
2859
  'new_order_heading' => __( 'New customer order', 'kadence-woocommerce-email-designer' ),
2860
  'cancelled_order_heading' => __( 'Cancelled order', 'kadence-woocommerce-email-designer' ),
2861
  'customer_processing_order_heading' => __( 'Thank you for your order', 'kadence-woocommerce-email-designer' ),
kadence-woocommerce-email-designer.php CHANGED
@@ -3,12 +3,12 @@
3
  * Plugin Name: Kadence WooCommerce Email Designer
4
  * Plugin URI: http://kadencewp.com/products/woocommerce-email-designer/
5
  * Description: Customize the default woocommerce email templates design and text through the native WordPress customizer. Preview emails and send test emails.
6
- * Version: 1.3.9
7
  * Author: Kadence WP
8
  * Author URI: http://kadencewp.com/
9
  * License: GPLv2 or later
10
  * Text Domain: kadence-woocommerce-email-designer
11
- * WC requires at least: 3.5.0
12
  * WC tested up to: 3.8.1
13
  *
14
  * @package Kadence Woocommerce Email Designer
@@ -59,7 +59,7 @@ class Kadence_Woomail_Designer {
59
 
60
  define( 'KT_WOOMAIL_PATH', realpath( plugin_dir_path( __FILE__ ) ) . DIRECTORY_SEPARATOR );
61
  define( 'KT_WOOMAIL_URL', plugin_dir_url( __FILE__ ) );
62
- define( 'KT_WOOMAIL_VERSION', '1.3.9' );
63
 
64
  if ( ! kadence_woomail_is_woo_active() ) {
65
  add_action( 'admin_notices', array( $this, 'admin_notice_need_woocommerce' ) );
@@ -326,6 +326,15 @@ class Kadence_Woomail_Designer {
326
  }
327
  $body_text = str_replace( '{invoice_pay_link}', $pay_link, $body_text );
328
  }
 
 
 
 
 
 
 
 
 
329
  } else {
330
  $body_text = Kadence_Woomail_Customizer::opt( $key . '_body' );
331
  }
@@ -341,6 +350,7 @@ class Kadence_Woomail_Designer {
341
  $body_text = str_replace( '{customer_last_name}', $order->get_billing_last_name(), $body_text );
342
  $body_text = str_replace( '{customer_full_name}', $order->get_formatted_billing_full_name(), $body_text );
343
  $body_text = str_replace( '{customer_company}', $order->get_billing_company(), $body_text );
 
344
  $body_text = str_replace( '{customer_username}', self::get_username_from_id( $user_id ), $body_text );
345
  }
346
 
@@ -404,6 +414,7 @@ class Kadence_Woomail_Designer {
404
  $subtitle = str_replace( '{customer_last_name}', $last_name, $subtitle );
405
  $subtitle = str_replace( '{customer_full_name}', $full_name, $subtitle );
406
  $subtitle = str_replace( '{customer_username}', $email->user_login, $subtitle );
 
407
 
408
  } elseif ( is_a( $email->object, 'WC_Order' ) ) {
409
  if ( 0 === ( $user_id = (int) get_post_meta( $email->object->get_id(), '_customer_user', true ) ) ) {
@@ -415,6 +426,7 @@ class Kadence_Woomail_Designer {
415
  $subtitle = str_replace( '{customer_last_name}', $email->object->get_billing_last_name(), $subtitle );
416
  $subtitle = str_replace( '{customer_full_name}', $email->object->get_formatted_billing_full_name(), $subtitle );
417
  $subtitle = str_replace( '{customer_company}', $email->object->get_billing_company(), $subtitle );
 
418
  $subtitle = str_replace( '{customer_username}', self::get_username_from_id( $user_id ), $subtitle );
419
  } elseif ( is_a( $email->object, 'WC_Product' ) ) {
420
  $subtitle = str_replace( '{product_title}', $email->object->get_title(), $subtitle );
@@ -468,6 +480,7 @@ class Kadence_Woomail_Designer {
468
  $body_text = str_replace( '{customer_last_name}', $last_name, $body_text );
469
  $body_text = str_replace( '{customer_full_name}', $full_name, $body_text );
470
  $body_text = str_replace( '{customer_username}', $email->user_login, $body_text );
 
471
  } elseif ( is_a( $email->object, 'WC_Product' ) ) {
472
  $body_text = str_replace( '{product_title}', $email->object->get_title(), $body_text );
473
  $body_text = str_replace( '{product_link}', $email->object->get_permalink(), $body_text );
@@ -520,6 +533,7 @@ class Kadence_Woomail_Designer {
520
  $string = str_replace( '{customer_last_name}', $last_name, $string );
521
  $string = str_replace( '{customer_full_name}', $full_name, $string );
522
  $string = str_replace( '{customer_username}', $email->user_login, $string );
 
523
 
524
  } else if ( is_a( $email->object, 'WC_Order' ) ) {
525
  if ( 0 === ( $user_id = (int) get_post_meta( $email->object->get_id(), '_customer_user', true ) ) ) {
@@ -529,6 +543,7 @@ class Kadence_Woomail_Designer {
529
  $string = str_replace( '{customer_last_name}', $email->object->get_billing_last_name(), $string );
530
  $string = str_replace( '{customer_full_name}', $email->object->get_formatted_billing_full_name(), $string );
531
  $string = str_replace( '{customer_company}', $email->object->get_billing_company(), $string );
 
532
  $string = str_replace( '{customer_username}', self::get_username_from_id( $user_id ), $string );
533
  }
534
 
3
  * Plugin Name: Kadence WooCommerce Email Designer
4
  * Plugin URI: http://kadencewp.com/products/woocommerce-email-designer/
5
  * Description: Customize the default woocommerce email templates design and text through the native WordPress customizer. Preview emails and send test emails.
6
+ * Version: 1.3.11
7
  * Author: Kadence WP
8
  * Author URI: http://kadencewp.com/
9
  * License: GPLv2 or later
10
  * Text Domain: kadence-woocommerce-email-designer
11
+ * WC requires at least: 3.6.0
12
  * WC tested up to: 3.8.1
13
  *
14
  * @package Kadence Woocommerce Email Designer
59
 
60
  define( 'KT_WOOMAIL_PATH', realpath( plugin_dir_path( __FILE__ ) ) . DIRECTORY_SEPARATOR );
61
  define( 'KT_WOOMAIL_URL', plugin_dir_url( __FILE__ ) );
62
+ define( 'KT_WOOMAIL_VERSION', '1.3.11' );
63
 
64
  if ( ! kadence_woomail_is_woo_active() ) {
65
  add_action( 'admin_notices', array( $this, 'admin_notice_need_woocommerce' ) );
326
  }
327
  $body_text = str_replace( '{invoice_pay_link}', $pay_link, $body_text );
328
  }
329
+ } elseif ( 'customer_payment_retry' == $key ) {
330
+ $body_text = Kadence_Woomail_Customizer::opt( $key . '_body' );
331
+ $btn_switch = Kadence_Woomail_Customizer::opt( $key . '_btn_switch' );
332
+ if ( true == $btn_switch ) {
333
+ $pay_link = '<p class="btn-container"><a class="btn" href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay Now &raquo;', 'kadence-woocommerce-email-designer' ) . '</a></p>';
334
+ } else {
335
+ $pay_link = '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay Now &raquo;', 'kadence-woocommerce-email-designer' ) . '</a>';
336
+ }
337
+ $body_text = str_replace( '{invoice_pay_link}', $pay_link, $body_text );
338
  } else {
339
  $body_text = Kadence_Woomail_Customizer::opt( $key . '_body' );
340
  }
350
  $body_text = str_replace( '{customer_last_name}', $order->get_billing_last_name(), $body_text );
351
  $body_text = str_replace( '{customer_full_name}', $order->get_formatted_billing_full_name(), $body_text );
352
  $body_text = str_replace( '{customer_company}', $order->get_billing_company(), $body_text );
353
+ $body_text = str_replace( '{customer_email}', $order->get_billing_email(), $body_text );
354
  $body_text = str_replace( '{customer_username}', self::get_username_from_id( $user_id ), $body_text );
355
  }
356
 
414
  $subtitle = str_replace( '{customer_last_name}', $last_name, $subtitle );
415
  $subtitle = str_replace( '{customer_full_name}', $full_name, $subtitle );
416
  $subtitle = str_replace( '{customer_username}', $email->user_login, $subtitle );
417
+ $subtitle = str_replace( '{customer_email}', $email->object->user_email, $subtitle );
418
 
419
  } elseif ( is_a( $email->object, 'WC_Order' ) ) {
420
  if ( 0 === ( $user_id = (int) get_post_meta( $email->object->get_id(), '_customer_user', true ) ) ) {
426
  $subtitle = str_replace( '{customer_last_name}', $email->object->get_billing_last_name(), $subtitle );
427
  $subtitle = str_replace( '{customer_full_name}', $email->object->get_formatted_billing_full_name(), $subtitle );
428
  $subtitle = str_replace( '{customer_company}', $email->object->get_billing_company(), $subtitle );
429
+ $subtitle = str_replace( '{customer_email}', $email->object->get_billing_email(), $subtitle );
430
  $subtitle = str_replace( '{customer_username}', self::get_username_from_id( $user_id ), $subtitle );
431
  } elseif ( is_a( $email->object, 'WC_Product' ) ) {
432
  $subtitle = str_replace( '{product_title}', $email->object->get_title(), $subtitle );
480
  $body_text = str_replace( '{customer_last_name}', $last_name, $body_text );
481
  $body_text = str_replace( '{customer_full_name}', $full_name, $body_text );
482
  $body_text = str_replace( '{customer_username}', $email->user_login, $body_text );
483
+ $body_text = str_replace( '{customer_email}', $email->object->user_email, $body_text );
484
  } elseif ( is_a( $email->object, 'WC_Product' ) ) {
485
  $body_text = str_replace( '{product_title}', $email->object->get_title(), $body_text );
486
  $body_text = str_replace( '{product_link}', $email->object->get_permalink(), $body_text );
533
  $string = str_replace( '{customer_last_name}', $last_name, $string );
534
  $string = str_replace( '{customer_full_name}', $full_name, $string );
535
  $string = str_replace( '{customer_username}', $email->user_login, $string );
536
+ $string = str_replace( '{customer_email}', $email->object->user_email, $string );
537
 
538
  } else if ( is_a( $email->object, 'WC_Order' ) ) {
539
  if ( 0 === ( $user_id = (int) get_post_meta( $email->object->get_id(), '_customer_user', true ) ) ) {
543
  $string = str_replace( '{customer_last_name}', $email->object->get_billing_last_name(), $string );
544
  $string = str_replace( '{customer_full_name}', $email->object->get_formatted_billing_full_name(), $string );
545
  $string = str_replace( '{customer_company}', $email->object->get_billing_company(), $string );
546
+ $string = str_replace( '{customer_email}', $email->object->get_billing_email(), $string );
547
  $string = str_replace( '{customer_username}', self::get_username_from_id( $user_id ), $string );
548
  }
549
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://www.kadencewp.com/about-us/
5
  Requires PHP: 5.2.4
6
  Requires at least: 4.4
7
  Tested up to: 5.3.2
8
- Stable tag: 1.3.9
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -60,6 +60,19 @@ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
60
 
61
  == Changelog ==
62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  = 1.3.9 =
64
  * Update: Prevent some third-party issues with filter arguments.
65
 
5
  Requires PHP: 5.2.4
6
  Requires at least: 4.4
7
  Tested up to: 5.3.2
8
+ Stable tag: 1.3.11
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
60
 
61
  == Changelog ==
62
 
63
+
64
+ = 1.3.11 =
65
+ * Update: Add Classes to order totals table so it's possible to style specifically.
66
+ * Update: Add Classes to email body so you can add styles that only effect certain emails.
67
+ * Add: Option to Customer Payment Retry email to make payment link a button.
68
+ * Add: Option to Customer Payment Retry email to use {invoice_pay_link} placeholder in content.
69
+ * Add: Option to edit Store manager Payment Retry email.
70
+ * Update: Add {customer_email} placeholder.
71
+ * Update: get_product to wc_get_product - thanks @dustinpitcher
72
+
73
+ = 1.3.10 =
74
+ * Update: Tweak android style.
75
+
76
  = 1.3.9 =
77
  * Update: Prevent some third-party issues with filter arguments.
78
 
templates/woo/emails/admin-payment-retry.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin payment retry email
4
+ *
5
+ * Email sent to admins when an attempt to automatically process a subscription renewal payment has failed
6
+ * and a retry rule has been applied to retry the payment in the future.
7
+ *
8
+ * @author Prospress
9
+ * @package WooCommerce_Subscriptions/Templates/Emails/Plain
10
+ * @version 2.6.0
11
+ */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit;
15
+ }
16
+
17
+ /**
18
+ * @hooked WC_Emails::email_header() Output the email header
19
+ */
20
+ do_action( 'woocommerce_email_header', $email_heading, $email );
21
+
22
+ $override_content = Kadence_Woomail_Customizer::opt( 'admin_payment_retry_override' );
23
+
24
+ if ( true == $override_content ) {
25
+
26
+ /**
27
+ * Email Main Body Text Action
28
+ *
29
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
30
+ */
31
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
32
+
33
+
34
+ } else {
35
+ /* translators: %1$s: an order number, %2$s: the customer's full name, %3$s: lowercase human time diff in the form returned by wcs_get_human_time_diff(), e.g. 'in 12 hours' */ ?>
36
+ <p><?php echo esc_html( sprintf( _x( 'The automatic recurring payment for order #%d from %s has failed. The payment will be retried %3$s.', 'In customer renewal invoice email', 'woocommerce-subscriptions' ), $order->get_order_number(), $order->get_formatted_billing_full_name(), wcs_get_human_time_diff( $retry->get_time() ) ) ); ?></p>
37
+ <p><?php esc_html_e( 'The renewal order is as follows:', 'woocommerce-subscriptions' ); ?></p>
38
+ <?php
39
+ }
40
+
41
+ /**
42
+ * @hooked WC_Emails::order_details() Shows the order details table.
43
+ * @since 2.5.0
44
+ */
45
+ do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
46
+
47
+ /**
48
+ * @hooked WC_Emails::order_meta() Shows order meta data.
49
+ */
50
+ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
51
+
52
+ /**
53
+ * @hooked WC_Emails::customer_details() Shows customer details
54
+ * @hooked WC_Emails::email_address() Shows email address
55
+ */
56
+ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
57
+
58
+ /**
59
+ * Show user-defined additional content - this is set in each email's settings.
60
+ */
61
+ if ( $additional_content ) {
62
+ echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
63
+ }
64
+
65
+ /**
66
+ * @hooked WC_Emails::email_footer() Output the email footer
67
+ */
68
+ do_action( 'woocommerce_email_footer', $email );
templates/woo/emails/customer-payment-retry.php CHANGED
@@ -32,6 +32,7 @@ if ( true == $override_content ) {
32
 
33
 
34
  } else {
 
35
  ?>
36
  <p>
37
  <?php
@@ -39,14 +40,20 @@ if ( true == $override_content ) {
39
  echo wp_kses( sprintf( _x( 'The automatic payment to renew your subscription with %1$s has failed. We will retry the payment %2$s.', 'In customer renewal invoice email', 'kadence-woocommerce-email-designer' ), esc_html( get_bloginfo( 'name' ) ), wcs_get_human_time_diff( $retry->get_time() ) ), array( 'a' => array( 'href' => true ) ) );
40
  ?>
41
  </p>
42
- <p>
 
 
 
 
 
 
 
 
 
 
 
43
  <?php
44
- // translators: %1$s %2$s: link markup to checkout payment url, note: no full stop due to url at the end
45
- echo wp_kses( sprintf( _x( 'To reactivate the subscription now, you can also login and pay for the renewal from your account page: %1$sPay Now &raquo;%2$s', 'In customer renewal invoice email', 'kadence-woocommerce-email-designer' ), '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">', '</a>' ), array( 'a' => array( 'href' => true ) ) );
46
- ?>
47
- </p>
48
-
49
- <?php
50
  }
51
 
52
  do_action( 'woocommerce_subscriptions_email_order_details', $order, $sent_to_admin, $plain_text, $email );
32
 
33
 
34
  } else {
35
+ $button_check = Kadence_Woomail_Customizer::opt( 'customer_payment_retry_btn_switch' );
36
  ?>
37
  <p>
38
  <?php
40
  echo wp_kses( sprintf( _x( 'The automatic payment to renew your subscription with %1$s has failed. We will retry the payment %2$s.', 'In customer renewal invoice email', 'kadence-woocommerce-email-designer' ), esc_html( get_bloginfo( 'name' ) ), wcs_get_human_time_diff( $retry->get_time() ) ), array( 'a' => array( 'href' => true ) ) );
41
  ?>
42
  </p>
43
+ <?php
44
+ if ( true == $button_check ) {
45
+ echo '<p>' . esc_html__( 'To reactivate the subscription now, you can also login and pay for the renewal from your account page:', 'kadence-woocommerce-email-designer' ) . '</p>';
46
+ echo '<p class="btn-container"><a href="' . esc_url( $order->get_checkout_payment_url() ) . '" class="btn">' . esc_html__( 'Pay Now &raquo;', 'kadence-woocommerce-email-designer' ) . '</a></p>';
47
+ } else {
48
+ ?>
49
+ <p>
50
+ <?php
51
+ // translators: %1$s %2$s: link markup to checkout payment url, note: no full stop due to url at the end
52
+ echo wp_kses( sprintf( _x( 'To reactivate the subscription now, you can also login and pay for the renewal from your account page: %1$sPay Now &raquo;%2$s', 'In customer renewal invoice email', 'kadence-woocommerce-email-designer' ), '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">', '</a>' ), array( 'a' => array( 'href' => true ) ) );
53
+ ?>
54
+ </p>
55
  <?php
56
+ }
 
 
 
 
 
57
  }
58
 
59
  do_action( 'woocommerce_subscriptions_email_order_details', $order, $sent_to_admin, $plain_text, $email );
templates/woo/emails/email-footer.php CHANGED
@@ -66,7 +66,7 @@ if ( empty( $footer_placement ) ) {
66
  if ( true != $responsive_check ) {
67
  ?>
68
  <div class="gm-remove-late" style="white-space: nowrap; line-height: 0; color: #ffffff;">
69
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
70
  </div>
71
  <?php
72
  }
66
  if ( true != $responsive_check ) {
67
  ?>
68
  <div class="gm-remove-late" style="white-space: nowrap; line-height: 0; color: #ffffff;">
69
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
70
  </div>
71
  <?php
72
  }
templates/woo/emails/email-header.php CHANGED
@@ -69,7 +69,7 @@ $img = get_option( 'woocommerce_email_header_image' )
69
  <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
70
  <title><?php echo wp_kses_post( get_bloginfo( 'name', 'display' ) ); ?></title>
71
  </head>
72
- <body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" class="kt-woo-wrap order-items-<?php echo esc_attr( $order_style ); ?> k-responsive-<?php echo esc_attr( $responsive_mode ); ?> title-style-<?php echo esc_attr( $h2_style ); ?>">
73
  <div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>">
74
  <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
75
  <tr>
69
  <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
70
  <title><?php echo wp_kses_post( get_bloginfo( 'name', 'display' ) ); ?></title>
71
  </head>
72
+ <body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" class="kt-woo-wrap order-items-<?php echo esc_attr( $order_style ); ?> k-responsive-<?php echo esc_attr( $responsive_mode ); ?> title-style-<?php echo esc_attr( $h2_style ); ?> email-id-<?php echo esc_attr( $key ); ?>">
73
  <div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>">
74
  <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
75
  <tr>
templates/woo/emails/email-order-details.php CHANGED
@@ -67,8 +67,8 @@ if ( isset( $order_type ) && 'subscription' === $order_type && class_exists( 'WC
67
  $i++;
68
  ?>
69
  <tr>
70
- <th class="td" scope="row" colspan="1" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['label'] ); ?></th>
71
- <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['value'] ); ?></td>
72
  </tr>
73
  <?php
74
  }
@@ -115,8 +115,8 @@ if ( isset( $order_type ) && 'subscription' === $order_type && class_exists( 'WC
115
  $i++;
116
  ?>
117
  <tr>
118
- <th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['label'] ); ?></th>
119
- <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['value'] ); ?></td>
120
  </tr>
121
  <?php
122
  }
@@ -235,8 +235,8 @@ if ( isset( $order_type ) && 'subscription' === $order_type && class_exists( 'WC
235
  $i++;
236
  ?>
237
  <tr>
238
- <th class="td" scope="row" colspan="1" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['label'] ); ?></th>
239
- <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['value'] ); ?></td>
240
  </tr>
241
  <?php
242
  }
@@ -301,8 +301,8 @@ if ( isset( $order_type ) && 'subscription' === $order_type && class_exists( 'WC
301
  $i++;
302
  ?>
303
  <tr>
304
- <th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['label'] ); ?></th>
305
- <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['value'] ); ?></td>
306
  </tr>
307
  <?php
308
  }
67
  $i++;
68
  ?>
69
  <tr>
70
+ <th class="td tlabel-<?php echo esc_attr( $total['label'] ); ?>" scope="row" colspan="1" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['label'] ); ?></th>
71
+ <td class="td tvalue-<?php echo esc_attr( $total['label'] ); ?>" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['value'] ); ?></td>
72
  </tr>
73
  <?php
74
  }
115
  $i++;
116
  ?>
117
  <tr>
118
+ <th class="td tlabel-<?php echo esc_attr( $total['label'] ); ?>" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['label'] ); ?></th>
119
+ <td class="td tvalue-<?php echo esc_attr( $total['label'] ); ?>" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['value'] ); ?></td>
120
  </tr>
121
  <?php
122
  }
235
  $i++;
236
  ?>
237
  <tr>
238
+ <th class="td tlabel-<?php echo esc_attr( $total['label'] ); ?>" scope="row" colspan="1" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['label'] ); ?></th>
239
+ <td class="td tvalue-<?php echo esc_attr( $total['label'] ); ?>" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['value'] ); ?></td>
240
  </tr>
241
  <?php
242
  }
301
  $i++;
302
  ?>
303
  <tr>
304
+ <th class="td tlabel-<?php echo esc_attr( $total['label'] ); ?>" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['label'] ); ?></th>
305
+ <td class="td tvalue-<?php echo esc_attr( $total['label'] ); ?>" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['value'] ); ?></td>
306
  </tr>
307
  <?php
308
  }
templates/woo/emails/waitlist-mailout.php CHANGED
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
11
  }
12
  $eobject = new stdClass();
13
  $eobject->id = 'woocommerce_waitlist_mailout';
14
- $eobject->object = get_product( $product_id );
15
  $hide_check = Kadence_Woomail_Customizer::opt( 'woocommerce_waitlist_mailout_hide_content' );
16
  do_action( 'woocommerce_email_header', $email_heading, $eobject ); ?>
17
 
11
  }
12
  $eobject = new stdClass();
13
  $eobject->id = 'woocommerce_waitlist_mailout';
14
+ $eobject->object = wc_get_product( $product_id );
15
  $hide_check = Kadence_Woomail_Customizer::opt( 'woocommerce_waitlist_mailout_hide_content' );
16
  do_action( 'woocommerce_email_header', $email_heading, $eobject ); ?>
17