Kadence WooCommerce Email Designer - Version 1.3.13

Version Description

  • Update: Fix possible bug in mac mail app.
  • Update: Add change_locale action for polylang.
Download this release

Release Info

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

Code changes from version 1.3.12 to 1.3.13

includes/class-kadence-woomail-customizer.php CHANGED
@@ -773,6 +773,9 @@ if ( ! class_exists( 'Kadence_Woomail_Customizer' ) ) {
773
  continue;
774
  }
775
  }
 
 
 
776
  if ( 'border_width' == $setting_key ) {
777
  if ( '' === self::get_stored_value( 'border_width_right' ) ) {
778
  $property = 'border-width';
773
  continue;
774
  }
775
  }
776
+ if ( ! $responsive_check && 'content_width' == $setting_key ) {
777
+ continue;
778
+ }
779
  if ( 'border_width' == $setting_key ) {
780
  if ( '' === self::get_stored_value( 'border_width_right' ) ) {
781
  $property = 'border-width';
includes/class-kadence-woomail-settings.php CHANGED
@@ -557,6 +557,24 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
557
  'value' => $key,
558
  ),
559
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560
  } else {
561
  // Email Subject.
562
  $email_text[ 'woocommerce_' . $key . '_settings[subject]' ] = array(
@@ -2304,6 +2322,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
2304
  'live_method' => 'css',
2305
  'selectors' => array(
2306
  '#template_footer_container' => array( 'background-color' ),
 
2307
  ),
2308
  ),
2309
  // Footer Top Padding
557
  'value' => $key,
558
  ),
559
  );
560
+ if ( version_compare( WC_VERSION, '3.7', '>' ) ) {
561
+ $email_text[ 'woocommerce_' . $key . '_settings[additional_content]' ] = array(
562
+ 'title' => __( 'Additional content', 'kadence-woocommerce-email-designer' ),
563
+ 'type' => 'textarea',
564
+ 'section' => 'mtype',
565
+ 'priority' => 20,
566
+ 'default' => '',
567
+ 'input_attrs' => array(
568
+ 'placeholder' => self::get_default_value( $key . '_additional_content' ),
569
+ ),
570
+ 'transport' => 'refresh',
571
+ 'active_callback' => array(
572
+ 'id' => 'email_type',
573
+ 'compare' => '==',
574
+ 'value' => $key,
575
+ ),
576
+ );
577
+ }
578
  } else {
579
  // Email Subject.
580
  $email_text[ 'woocommerce_' . $key . '_settings[subject]' ] = array(
2322
  'live_method' => 'css',
2323
  'selectors' => array(
2324
  '#template_footer_container' => array( 'background-color' ),
2325
+ '.gmail-app-fix' => array( 'background-color' ),
2326
  ),
2327
  ),
2328
  // Footer Top Padding
kadence-woocommerce-email-designer.php CHANGED
@@ -3,13 +3,13 @@
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.12
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.9.1
13
  *
14
  * @package Kadence Woocommerce Email Designer
15
  */
@@ -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.12' );
63
 
64
  if ( ! kadence_woomail_is_woo_active() ) {
65
  add_action( 'admin_notices', array( $this, 'admin_notice_need_woocommerce' ) );
@@ -126,10 +126,13 @@ class Kadence_Woomail_Designer {
126
 
127
  add_filter( 'woocommerce_email_restore_locale', array( $this, 'restore_to_user_locale' ) );
128
 
129
- add_filter( 'woocommerce_email_styles', array( $this, 'check_to_add_gmail_hack' ), 50, 2 );
130
 
131
  //require_once KT_WOOMAIL_PATH . 'includes/class-kwed-cartflows-ca-email.php'; // Add CartFlows, soon.
132
 
 
 
 
133
  }
134
  /**
135
  * Adds the filter for email hack if this filter runs.
@@ -191,6 +194,11 @@ class Kadence_Woomail_Designer {
191
  * Set up the footer content
192
  */
193
  public function email_footer_content() {
 
 
 
 
 
194
  $social_enable = Kadence_Woomail_Customizer::opt( 'footer_social_enable' );
195
  $social_links = Kadence_Woomail_Customizer::opt( 'footer_social_repeater' );
196
  $social_links = json_decode( $social_links );
@@ -198,7 +206,7 @@ class Kadence_Woomail_Designer {
198
  <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_footer_container">
199
  <tr>
200
  <td valign="top" align="center">
201
- <table border="0" cellpadding="10" cellspacing="0" width="600" id="template_footer">
202
  <tr>
203
  <td valign="top" id="template_footer_inside">
204
  <table border="0" cellpadding="10" cellspacing="0" width="100%">
@@ -210,8 +218,10 @@ class Kadence_Woomail_Designer {
210
  <?php
211
  $items = count( $social_links );
212
  foreach ( $social_links as $social_link ) {
213
- echo '<td valign="middle" style="text-align:center; width:' . esc_attr( round( 100 / $items, 2 ) ) . '%">';
214
- echo '<a href="' . esc_url( $social_link->link ) . '" class="ft-social-link" style="display:block; text-decoration: none;">';
 
 
215
  if ( 'customizer_repeater_image' == $social_link->choice ) {
216
  echo '<img src="' . esc_attr( $social_link->image_url ) . '" width="24" style="vertical-align: bottom;">';
217
  } else if ( 'customizer_repeater_icon' == $social_link->choice ) {
@@ -223,9 +233,11 @@ class Kadence_Woomail_Designer {
223
  }
224
  echo '<img src="' . esc_attr( KT_WOOMAIL_URL . 'assets/images/' . $color . '/' . $img_string ) . '.png" width="24" style="vertical-align: bottom;">';
225
  }
226
- echo '<span class="ft-social-title">' . esc_html( $social_link->title ) . '</span>';
227
- echo '</a>';
228
- echo '</td>';
 
 
229
  }
230
  ?>
231
  </tr>
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.13
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.9.2
13
  *
14
  * @package Kadence Woocommerce Email Designer
15
  */
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.13' );
63
 
64
  if ( ! kadence_woomail_is_woo_active() ) {
65
  add_action( 'admin_notices', array( $this, 'admin_notice_need_woocommerce' ) );
126
 
127
  add_filter( 'woocommerce_email_restore_locale', array( $this, 'restore_to_user_locale' ) );
128
 
129
+ //add_filter( 'woocommerce_email_styles', array( $this, 'check_to_add_gmail_hack' ), 50, 2 );
130
 
131
  //require_once KT_WOOMAIL_PATH . 'includes/class-kwed-cartflows-ca-email.php'; // Add CartFlows, soon.
132
 
133
+ // Forces the WordPress to use the correct language file if switched.
134
+ add_action( 'change_locale', array( $this, 'filter_locate_template_language' ) );
135
+
136
  }
137
  /**
138
  * Adds the filter for email hack if this filter runs.
194
  * Set up the footer content
195
  */
196
  public function email_footer_content() {
197
+ $content_width = Kadence_Woomail_Customizer::opt( 'content_width' );
198
+ if ( empty( $content_width ) ) {
199
+ $content_width = '600';
200
+ }
201
+ $content_width = str_replace( 'px', '', $content_width );
202
  $social_enable = Kadence_Woomail_Customizer::opt( 'footer_social_enable' );
203
  $social_links = Kadence_Woomail_Customizer::opt( 'footer_social_repeater' );
204
  $social_links = json_decode( $social_links );
206
  <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_footer_container">
207
  <tr>
208
  <td valign="top" align="center">
209
+ <table border="0" cellpadding="10" cellspacing="0" width="<?php echo esc_attr( $content_width ); ?>" id="template_footer">
210
  <tr>
211
  <td valign="top" id="template_footer_inside">
212
  <table border="0" cellpadding="10" cellspacing="0" width="100%">
218
  <?php
219
  $items = count( $social_links );
220
  foreach ( $social_links as $social_link ) {
221
+ ?>
222
+ <td valign="middle" style="text-align:center; width:<?php echo esc_attr( round( 100 / $items, 2 ) ); ?>%">
223
+ <a href="<?php echo esc_url( $social_link->link ); ?>" class="ft-social-link" style="display:block; text-decoration: none;">
224
+ <?php
225
  if ( 'customizer_repeater_image' == $social_link->choice ) {
226
  echo '<img src="' . esc_attr( $social_link->image_url ) . '" width="24" style="vertical-align: bottom;">';
227
  } else if ( 'customizer_repeater_icon' == $social_link->choice ) {
233
  }
234
  echo '<img src="' . esc_attr( KT_WOOMAIL_URL . 'assets/images/' . $color . '/' . $img_string ) . '.png" width="24" style="vertical-align: bottom;">';
235
  }
236
+ ?>
237
+ <span class="ft-social-title"><?php echo esc_html( $social_link->title ); ?></span>
238
+ </a>
239
+ </td>
240
+ <?php
241
  }
242
  ?>
243
  </tr>
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.12
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -60,6 +60,10 @@ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
60
 
61
  == Changelog ==
62
 
 
 
 
 
63
  = 1.3.12 =
64
  * Fix: Classes to order totals table so it's possible to style specifically.
65
  * Fix: Additional Information in customer retry payment email.
5
  Requires PHP: 5.2.4
6
  Requires at least: 4.4
7
  Tested up to: 5.3.2
8
+ Stable tag: 1.3.13
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
60
 
61
  == Changelog ==
62
 
63
+ = 1.3.13 =
64
+ * Update: Fix possible bug in mac mail app.
65
+ * Update: Add change_locale action for polylang.
66
+
67
  = 1.3.12 =
68
  * Fix: Classes to order totals table so it's possible to style specifically.
69
  * Fix: Additional Information in customer retry payment email.
templates/woo/emails/email-footer.php CHANGED
@@ -19,7 +19,7 @@
19
  /**
20
  * EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
21
  *
22
- * Add option tp Move footer out of template container so background can be fullwidth
23
  * Change width="600" to width 100% for tables
24
  * Add subtitle option.
25
  * Add Header image container
@@ -27,13 +27,21 @@
27
  */
28
 
29
  if ( ! defined( 'ABSPATH' ) ) {
30
- exit; // Exit if accessed directly
31
  }
32
  $footer_placement = Kadence_Woomail_Customizer::opt( 'footer_background_placement' );
33
  $responsive_check = Kadence_Woomail_Customizer::opt( 'responsive_mode' );
34
  if ( empty( $footer_placement ) ) {
35
  $footer_placement = 'inside';
36
  }
 
 
 
 
 
 
 
 
37
 
38
  ?>
39
  </div>
@@ -49,27 +57,54 @@ if ( empty( $footer_placement ) ) {
49
  </tr>
50
  <tr>
51
  <td align="center" valign="top">
52
- <?php if( 'inside' == $footer_placement ) {
53
- do_action('kadence_woomail_designer_email_footer');
54
- } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  </td>
56
  </tr>
57
  </table> <!-- End template container -->
58
- <?php if( 'outside' == $footer_placement ) {
59
- do_action('kadence_woomail_designer_email_footer');
60
- } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  </td>
62
  </tr>
63
  </table>
64
  </div>
65
- <?php
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
- }
73
- ?>
74
  </body>
75
  </html>
19
  /**
20
  * EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
21
  *
22
+ * Add option tp Move footer out of template container so background can be fullwidth.
23
  * Change width="600" to width 100% for tables
24
  * Add subtitle option.
25
  * Add Header image container
27
  */
28
 
29
  if ( ! defined( 'ABSPATH' ) ) {
30
+ exit; // Exit if accessed directly.
31
  }
32
  $footer_placement = Kadence_Woomail_Customizer::opt( 'footer_background_placement' );
33
  $responsive_check = Kadence_Woomail_Customizer::opt( 'responsive_mode' );
34
  if ( empty( $footer_placement ) ) {
35
  $footer_placement = 'inside';
36
  }
37
+ $content_width = Kadence_Woomail_Customizer::opt( 'content_width' );
38
+ if ( empty( $content_width ) ) {
39
+ $content_width = '600';
40
+ }
41
+ $content_width = str_replace( 'px', '', $content_width );
42
+ if ( $responsive_check ) {
43
+ $content_width = '360';
44
+ }
45
 
46
  ?>
47
  </div>
57
  </tr>
58
  <tr>
59
  <td align="center" valign="top">
60
+ <?php
61
+ if ( 'inside' == $footer_placement ) {
62
+ do_action( 'kadence_woomail_designer_email_footer' );
63
+ ?>
64
+ <table class="gmail-app-fix" width="100%" border="0" cellpadding="0" cellspacing="0">
65
+ <tr>
66
+ <td>
67
+ <table cellpadding="0" cellspacing="0" border="0" align="center" width="<?php echo esc_attr( $content_width ); ?>">
68
+ <tr>
69
+ <td cellpadding="0" cellspacing="0" border="0" height="1"; style="line-height: 1px; min-width: <?php echo esc_attr( floor( $content_width / 3 ) ); ?>px;">
70
+ </td>
71
+ <td cellpadding="0" cellspacing="0" border="0" height="1"; style="line-height: 1px; min-width: <?php echo esc_attr( floor( $content_width / 3 ) ); ?>px;">
72
+ </td>
73
+ <td cellpadding="0" cellspacing="0" border="0" height="1"; style="line-height: 1px; min-width: <?php echo esc_attr( floor( $content_width / 3 ) ); ?>px;">
74
+ </td>
75
+ </tr>
76
+ </table>
77
+ </td>
78
+ </tr>
79
+ </table>
80
+ <?php } ?>
81
  </td>
82
  </tr>
83
  </table> <!-- End template container -->
84
+ <?php
85
+ if ( 'outside' == $footer_placement ) {
86
+ do_action( 'kadence_woomail_designer_email_footer' );
87
+ ?>
88
+ <table class="gmail-app-fix" width="100%" border="0" cellpadding="0" cellspacing="0">
89
+ <tr>
90
+ <td>
91
+ <table cellpadding="0" cellspacing="0" border="0" align="center" width="<?php echo esc_attr( $content_width ); ?>">
92
+ <tr>
93
+ <td cellpadding="0" cellspacing="0" border="0" height="1"; style="line-height: 1px; min-width: <?php echo esc_attr( floor( $content_width / 3 ) ); ?>px;">
94
+ </td>
95
+ <td cellpadding="0" cellspacing="0" border="0" height="1"; style="line-height: 1px; min-width: <?php echo esc_attr( floor( $content_width / 3 ) ); ?>px;">
96
+ </td>
97
+ <td cellpadding="0" cellspacing="0" border="0" height="1"; style="line-height: 1px; min-width: <?php echo esc_attr( floor( $content_width / 3 ) ); ?>px;">
98
+ </td>
99
+ </tr>
100
+ </table>
101
+ </td>
102
+ </tr>
103
+ </table>
104
+ <?php } ?>
105
  </td>
106
  </tr>
107
  </table>
108
  </div>
 
 
 
 
 
 
 
 
 
109
  </body>
110
  </html>
templates/woo/emails/email-header.php CHANGED
@@ -44,6 +44,11 @@ if ( true == $responsive_check ) {
44
  } else {
45
  $responsive_mode = 'normal';
46
  }
 
 
 
 
 
47
  $order_style = Kadence_Woomail_Customizer::opt( 'order_items_style' );
48
  if ( empty( $order_style ) ) {
49
  $order_style = 'normal';
@@ -93,7 +98,7 @@ $img = get_option( 'woocommerce_email_header_image' )
93
  </tr>
94
  </table>
95
  <?php } ?>
96
- <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container">
97
  <tr>
98
  <td align="center" valign="top">
99
  <?php if ( 'inside' === $header_placement ) { ?>
@@ -116,7 +121,7 @@ $img = get_option( 'woocommerce_email_header_image' )
116
  </table>
117
  <?php } ?>
118
  <!-- Header -->
119
- <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_header">
120
  <tr>
121
  <td id="header_wrapper">
122
  <?php if ( 'above' === $subtitle_placement && ! empty( $email_subtitle ) ) { ?>
@@ -135,7 +140,7 @@ $img = get_option( 'woocommerce_email_header_image' )
135
  <tr>
136
  <td align="center" valign="top">
137
  <!-- Body -->
138
- <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_body">
139
  <tr>
140
  <td valign="top" id="body_content">
141
  <!-- Content -->
44
  } else {
45
  $responsive_mode = 'normal';
46
  }
47
+ $content_width = Kadence_Woomail_Customizer::opt( 'content_width' );
48
+ if ( empty( $content_width ) ) {
49
+ $content_width = '600';
50
+ }
51
+ $content_width = str_replace( 'px', '', $content_width );
52
  $order_style = Kadence_Woomail_Customizer::opt( 'order_items_style' );
53
  if ( empty( $order_style ) ) {
54
  $order_style = 'normal';
98
  </tr>
99
  </table>
100
  <?php } ?>
101
+ <table border="0" cellpadding="0" cellspacing="0" width="<?php echo esc_attr( $content_width ); ?>" id="template_container">
102
  <tr>
103
  <td align="center" valign="top">
104
  <?php if ( 'inside' === $header_placement ) { ?>
121
  </table>
122
  <?php } ?>
123
  <!-- Header -->
124
+ <table border="0" cellpadding="0" cellspacing="0" width="<?php echo esc_attr( $content_width ); ?>" id="template_header">
125
  <tr>
126
  <td id="header_wrapper">
127
  <?php if ( 'above' === $subtitle_placement && ! empty( $email_subtitle ) ) { ?>
140
  <tr>
141
  <td align="center" valign="top">
142
  <!-- Body -->
143
+ <table border="0" cellpadding="0" cellspacing="0" width="<?php echo esc_attr( $content_width ); ?>" id="template_body">
144
  <tr>
145
  <td valign="top" id="body_content">
146
  <!-- Content -->
templates/woo/emails/email-styles.php CHANGED
@@ -132,7 +132,6 @@ body {
132
 
133
  #template_footer td {
134
  padding: 0;
135
- -webkit-border-radius: 6px;
136
  }
137
 
138
  #template_footer #credit {
132
 
133
  #template_footer td {
134
  padding: 0;
 
135
  }
136
 
137
  #template_footer #credit {