Version Description
- Fix: Partial refund text.
- Add: New option for product photo in email.
- Fix: Outlook issue.
- Update: Woo 3.5 currently not adding the footer text to templates. May consider adding later and making editable.
Download this release
Release Info
Developer | britner |
Plugin | Kadence WooCommerce Email Designer |
Version | 1.0.6 |
Comparing to | |
See all releases |
Code changes from version 1.0.5 to 1.0.6
- includes/class-kadence-woomail-settings.php +14 -0
- kadence-woocommerce-email-designer.php +29 -5
- readme.txt +8 -2
- templates/woo/emails/admin-cancelled-order.php +8 -8
- templates/woo/emails/admin-failed-order.php +1 -1
- templates/woo/emails/admin-new-order.php +1 -1
- templates/woo/emails/customer-completed-order.php +1 -1
- templates/woo/emails/customer-invoice.php +1 -1
- templates/woo/emails/customer-new-account.php +1 -1
- templates/woo/emails/customer-note.php +2 -2
- templates/woo/emails/customer-on-hold-order.php +1 -1
- templates/woo/emails/customer-processing-order.php +1 -1
- templates/woo/emails/customer-refunded-order.php +1 -1
- templates/woo/emails/customer-reset-password.php +1 -1
- templates/woo/emails/email-header.php +2 -2
- templates/woo/emails/email-order-details.php +2 -2
- templates/woo/emails/email-styles.php +4 -1
includes/class-kadence-woomail-settings.php
CHANGED
@@ -569,6 +569,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
569 |
'section' => 'mtype',
|
570 |
'default' => Kadence_Woomail_Settings::get_default_value( $key.'_body_partial' ),
|
571 |
'original' => '',
|
|
|
572 |
'active_callback' => array(
|
573 |
'id' => 'email_type',
|
574 |
'compare' => '==',
|
@@ -1581,6 +1582,18 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1581 |
'light' => __('Light', 'kadence-woocommerce-email-designer'),
|
1582 |
),
|
1583 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1584 |
// Items table Background color
|
1585 |
'items_table_background_color' => array(
|
1586 |
'title' => __('Order Table Background color', 'kadence-woocommerce-email-designer'),
|
@@ -2274,6 +2287,7 @@ To reset your password, visit the following address:', 'kadence-woocommerce-emai
|
|
2274 |
'h3_font_weight' => '500',
|
2275 |
|
2276 |
'order_items_style' => 'normal',
|
|
|
2277 |
'items_table_border_width' => '1',
|
2278 |
'items_table_border_color' => '#e4e4e4',
|
2279 |
'items_table_border_style' => 'solid',
|
569 |
'section' => 'mtype',
|
570 |
'default' => Kadence_Woomail_Settings::get_default_value( $key.'_body_partial' ),
|
571 |
'original' => '',
|
572 |
+
'transport' => 'refresh',
|
573 |
'active_callback' => array(
|
574 |
'id' => 'email_type',
|
575 |
'compare' => '==',
|
1582 |
'light' => __('Light', 'kadence-woocommerce-email-designer'),
|
1583 |
),
|
1584 |
),
|
1585 |
+
// Order ITEMS Image
|
1586 |
+
'order_items_image' => array(
|
1587 |
+
'title' => __('Product Image Option', 'kadence-woocommerce-email-designer'),
|
1588 |
+
'section' => 'items_table',
|
1589 |
+
'default' => Kadence_Woomail_Settings::get_default_value( 'order_items_image' ),
|
1590 |
+
'transport' => 'refresh',
|
1591 |
+
'type' => 'select',
|
1592 |
+
'choices' => array(
|
1593 |
+
'normal' => __('Do not show', 'kadence-woocommerce-email-designer'),
|
1594 |
+
'show' => __('Show', 'kadence-woocommerce-email-designer'),
|
1595 |
+
),
|
1596 |
+
),
|
1597 |
// Items table Background color
|
1598 |
'items_table_background_color' => array(
|
1599 |
'title' => __('Order Table Background color', 'kadence-woocommerce-email-designer'),
|
2287 |
'h3_font_weight' => '500',
|
2288 |
|
2289 |
'order_items_style' => 'normal',
|
2290 |
+
'order_items_image' => 'normal',
|
2291 |
'items_table_border_width' => '1',
|
2292 |
'items_table_border_color' => '#e4e4e4',
|
2293 |
'items_table_border_style' => 'solid',
|
kadence-woocommerce-email-designer.php
CHANGED
@@ -3,11 +3,13 @@
|
|
3 |
* Plugin Name: Kadence WooCommerce Email Designer
|
4 |
* Plugin URI: http://kadencethemes.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.0.
|
7 |
* Author: Kadence Themes
|
8 |
* Author URI: http://kadencethemes.com/
|
9 |
* License: GPLv2 or later
|
10 |
* Text Domain: kadence-woocommerce-email-designer
|
|
|
|
|
11 |
*
|
12 |
* @package Kadence Woocommerce Email Designer
|
13 |
*/
|
@@ -51,7 +53,7 @@ class Kadence_Woomail_Designer {
|
|
51 |
|
52 |
define( 'KT_WOOMAIL_PATH' , realpath( plugin_dir_path(__FILE__) ) . DIRECTORY_SEPARATOR );
|
53 |
define( 'KT_WOOMAIL_URL' , plugin_dir_url(__FILE__) );
|
54 |
-
define( 'KT_WOOMAIL_VERSION' , '1.0.
|
55 |
|
56 |
if( ! kadence_woomail_is_woo_active() ) {
|
57 |
add_action( 'admin_notices', array( $this, 'admin_notice_need_woocommerce' ) );
|
@@ -101,6 +103,26 @@ class Kadence_Woomail_Designer {
|
|
101 |
// Hook in footer container
|
102 |
add_action( 'kadence_woomail_designer_email_footer', array( $this, 'email_footer_content' ), 10 );
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
}
|
105 |
// Add a notice about woocommerce being needed.
|
106 |
public function admin_notice_need_woocommerce() {
|
@@ -191,13 +213,14 @@ class Kadence_Woomail_Designer {
|
|
191 |
|
192 |
// Get Email ID
|
193 |
$key = $email->id;
|
194 |
-
|
195 |
if ( 'customer_refunded_order' == $key ) {
|
196 |
if( $email->partial_refund ) {
|
197 |
-
$body_text = Kadence_Woomail_Customizer::opt( $key.'_body_partial' );
|
198 |
} else {
|
199 |
-
$body_text = Kadence_Woomail_Customizer::opt( $key.'_body_full' );
|
200 |
}
|
|
|
|
|
201 |
} else if ( 'customer_invoice' == $key ) {
|
202 |
if( $order->has_status( 'pending' ) ) {
|
203 |
$body_text = Kadence_Woomail_Customizer::opt( $key.'_body' );
|
@@ -506,3 +529,4 @@ class Kadence_Woomail_Plugin_Check {
|
|
506 |
function kadence_woomail_is_woo_active() {
|
507 |
return Kadence_Woomail_Plugin_Check::active_check_woo();
|
508 |
}
|
|
3 |
* Plugin Name: Kadence WooCommerce Email Designer
|
4 |
* Plugin URI: http://kadencethemes.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.0.6
|
7 |
* Author: Kadence Themes
|
8 |
* Author URI: http://kadencethemes.com/
|
9 |
* License: GPLv2 or later
|
10 |
* Text Domain: kadence-woocommerce-email-designer
|
11 |
+
* WC requires at least: 3.4.0
|
12 |
+
* WC tested up to: 3.5.0
|
13 |
*
|
14 |
* @package Kadence Woocommerce Email Designer
|
15 |
*/
|
53 |
|
54 |
define( 'KT_WOOMAIL_PATH' , realpath( plugin_dir_path(__FILE__) ) . DIRECTORY_SEPARATOR );
|
55 |
define( 'KT_WOOMAIL_URL' , plugin_dir_url(__FILE__) );
|
56 |
+
define( 'KT_WOOMAIL_VERSION' , '1.0.6' );
|
57 |
|
58 |
if( ! kadence_woomail_is_woo_active() ) {
|
59 |
add_action( 'admin_notices', array( $this, 'admin_notice_need_woocommerce' ) );
|
103 |
// Hook in footer container
|
104 |
add_action( 'kadence_woomail_designer_email_footer', array( $this, 'email_footer_content' ), 10 );
|
105 |
|
106 |
+
// hook in email photo option.
|
107 |
+
add_filter( 'woocommerce_email_order_items_table', array( $this, 'add_wc_order_email_images' ), 10, 2 );
|
108 |
+
|
109 |
+
}
|
110 |
+
public function add_wc_order_email_images( $output, $order ) {
|
111 |
+
$product_photo = Kadence_Woomail_Customizer::opt( 'order_items_image' );
|
112 |
+
if ( 'show' === $product_photo ) {
|
113 |
+
static $run = 0;
|
114 |
+
if ( $run ) {
|
115 |
+
return $output;
|
116 |
+
}
|
117 |
+
$args = array(
|
118 |
+
'show_image' => true,
|
119 |
+
'image_size' => array( 100, 50 ),
|
120 |
+
);
|
121 |
+
$run++;
|
122 |
+
|
123 |
+
return $order->email_order_items_table( $args );
|
124 |
+
}
|
125 |
+
return $output;
|
126 |
}
|
127 |
// Add a notice about woocommerce being needed.
|
128 |
public function admin_notice_need_woocommerce() {
|
213 |
|
214 |
// Get Email ID
|
215 |
$key = $email->id;
|
|
|
216 |
if ( 'customer_refunded_order' == $key ) {
|
217 |
if( $email->partial_refund ) {
|
218 |
+
$body_text = Kadence_Woomail_Customizer::opt( $key . '_body_partial' );
|
219 |
} else {
|
220 |
+
$body_text = Kadence_Woomail_Customizer::opt( $key . '_body_full' );
|
221 |
}
|
222 |
+
} else if ( 'customer_partially_refunded_order' == $key ) {
|
223 |
+
$body_text = Kadence_Woomail_Customizer::opt( 'customer_refunded_order_body_partial' );
|
224 |
} else if ( 'customer_invoice' == $key ) {
|
225 |
if( $order->has_status( 'pending' ) ) {
|
226 |
$body_text = Kadence_Woomail_Customizer::opt( $key.'_body' );
|
529 |
function kadence_woomail_is_woo_active() {
|
530 |
return Kadence_Woomail_Plugin_Check::active_check_woo();
|
531 |
}
|
532 |
+
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: https://www.kadencethemes.com/about-us/
|
|
5 |
Requires PHP: 5.2.4
|
6 |
Requires at least: 4.4
|
7 |
Tested up to: 4.9.8
|
8 |
-
Stable tag: 1.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -55,7 +55,13 @@ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
-
= 1.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
* Add Translations: Finnish.
|
60 |
* Update: Translations, remove some fuzzy.
|
61 |
|
5 |
Requires PHP: 5.2.4
|
6 |
Requires at least: 4.4
|
7 |
Tested up to: 4.9.8
|
8 |
+
Stable tag: 1.0.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
= 1.0.6 =
|
59 |
+
* Fix: Partial refund text.
|
60 |
+
* Add: New option for product photo in email.
|
61 |
+
* Fix: Outlook issue.
|
62 |
+
* Update: Woo 3.5 currently not adding the footer text to templates. May consider adding later and making editable.
|
63 |
+
|
64 |
+
= 1.0.5 =
|
65 |
* Add Translations: Finnish.
|
66 |
* Update: Translations, remove some fuzzy.
|
67 |
|
templates/woo/emails/admin-cancelled-order.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
-
* @version
|
17 |
*/
|
18 |
|
19 |
/**
|
@@ -22,14 +22,14 @@
|
|
22 |
* 2. Remove static main text area.
|
23 |
*/
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
|
34 |
/**
|
35 |
* @hooked Kadence_Woomail_Designer::email_main_text_area
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.5.0
|
17 |
*/
|
18 |
|
19 |
/**
|
22 |
* 2. Remove static main text area.
|
23 |
*/
|
24 |
|
25 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
26 |
+
exit;
|
27 |
+
}
|
28 |
|
29 |
+
/**
|
30 |
+
* @hooked WC_Emails::email_header() Output the email header
|
31 |
+
*/
|
32 |
+
do_action( 'woocommerce_email_header', $email_heading, $email );
|
33 |
|
34 |
/**
|
35 |
* @hooked Kadence_Woomail_Designer::email_main_text_area
|
templates/woo/emails/admin-failed-order.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
-
* @version
|
17 |
*/
|
18 |
|
19 |
/**
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.5.0
|
17 |
*/
|
18 |
|
19 |
/**
|
templates/woo/emails/admin-new-order.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails/HTML
|
16 |
-
* @version
|
17 |
*/
|
18 |
|
19 |
/**
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails/HTML
|
16 |
+
* @version 3.5.0
|
17 |
*/
|
18 |
|
19 |
/**
|
templates/woo/emails/customer-completed-order.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
-
* @version
|
17 |
*/
|
18 |
|
19 |
/**
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.5.0
|
17 |
*/
|
18 |
|
19 |
/**
|
templates/woo/emails/customer-invoice.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
-
* @version
|
17 |
*/
|
18 |
|
19 |
/**
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.5.0
|
17 |
*/
|
18 |
|
19 |
/**
|
templates/woo/emails/customer-new-account.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
-
* @version
|
17 |
*/
|
18 |
|
19 |
/**
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.5.0
|
17 |
*/
|
18 |
|
19 |
/**
|
templates/woo/emails/customer-note.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
-
* @version
|
17 |
*/
|
18 |
|
19 |
/**
|
@@ -38,7 +38,7 @@ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $pl
|
|
38 |
|
39 |
<blockquote><?php echo wpautop( wptexturize( $customer_note ) ) ?></blockquote>
|
40 |
|
41 |
-
<p><?php _e(
|
42 |
|
43 |
<?php
|
44 |
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.5.0
|
17 |
*/
|
18 |
|
19 |
/**
|
38 |
|
39 |
<blockquote><?php echo wpautop( wptexturize( $customer_note ) ) ?></blockquote>
|
40 |
|
41 |
+
<p><?php _e( 'For your reference, your order details are shown below.', 'kadence-woocommerce-email-designer' ); ?></p>
|
42 |
|
43 |
<?php
|
44 |
|
templates/woo/emails/customer-on-hold-order.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
-
* @version
|
17 |
*/
|
18 |
|
19 |
/**
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.5.0
|
17 |
*/
|
18 |
|
19 |
/**
|
templates/woo/emails/customer-processing-order.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
-
* @version
|
17 |
*/
|
18 |
|
19 |
/**
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.5.0
|
17 |
*/
|
18 |
|
19 |
/**
|
templates/woo/emails/customer-refunded-order.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
-
* @version
|
17 |
*/
|
18 |
|
19 |
/**
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.5.0
|
17 |
*/
|
18 |
|
19 |
/**
|
templates/woo/emails/customer-reset-password.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
-
* @version
|
17 |
*/
|
18 |
|
19 |
/**
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.5.0
|
17 |
*/
|
18 |
|
19 |
/**
|
templates/woo/emails/email-header.php
CHANGED
@@ -64,7 +64,7 @@ if ( empty( $h2_style ) ) {
|
|
64 |
?>
|
65 |
</div>
|
66 |
</div>
|
67 |
-
<table border="0" cellpadding="0" cellspacing="0" width="
|
68 |
<tr>
|
69 |
<td align="center" valign="top">
|
70 |
<!-- Header -->
|
@@ -87,7 +87,7 @@ if ( empty( $h2_style ) ) {
|
|
87 |
<tr>
|
88 |
<td align="center" valign="top">
|
89 |
<!-- Body -->
|
90 |
-
<table border="0" cellpadding="0" cellspacing="0" width="
|
91 |
<tr>
|
92 |
<td valign="top" id="body_content">
|
93 |
<!-- Content -->
|
64 |
?>
|
65 |
</div>
|
66 |
</div>
|
67 |
+
<table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container">
|
68 |
<tr>
|
69 |
<td align="center" valign="top">
|
70 |
<!-- Header -->
|
87 |
<tr>
|
88 |
<td align="center" valign="top">
|
89 |
<!-- Body -->
|
90 |
+
<table border="0" cellpadding="0" cellspacing="0" width="600" id="template_body">
|
91 |
<tr>
|
92 |
<td valign="top" id="body_content">
|
93 |
<!-- Content -->
|
templates/woo/emails/email-order-details.php
CHANGED
@@ -105,8 +105,8 @@ if ( 'split' == $order_head_style ) {
|
|
105 |
$i++;
|
106 |
?>
|
107 |
<tr>
|
108 |
-
<th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>;
|
109 |
-
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;
|
110 |
</tr>
|
111 |
<?php
|
112 |
}
|
105 |
$i++;
|
106 |
?>
|
107 |
<tr>
|
108 |
+
<th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['label'] ); ?></th>
|
109 |
+
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $total['value'] ); ?></td>
|
110 |
</tr>
|
111 |
<?php
|
112 |
}
|
templates/woo/emails/email-styles.php
CHANGED
@@ -237,7 +237,10 @@ img {
|
|
237 |
text-decoration: none;
|
238 |
text-transform: capitalize;
|
239 |
}
|
240 |
-
|
|
|
|
|
|
|
241 |
|
242 |
.order-items-light table.td .td {
|
243 |
border-left: 0 !important;
|
237 |
text-decoration: none;
|
238 |
text-transform: capitalize;
|
239 |
}
|
240 |
+
.order_item img {
|
241 |
+
display:block;
|
242 |
+
padding-bottom:5px;
|
243 |
+
}
|
244 |
|
245 |
.order-items-light table.td .td {
|
246 |
border-left: 0 !important;
|