Version Description
- ADD: Fluid/Responsive Setting
- ADD: Inner Max width Setting
- ADD: Additional Content
- ADD: Address Padding
- ADD: Button Styles ( Plus options for some links to be buttons ).
- UPDATE: All tempaltes updated for WC 3.7
- Update: Table Padding now has left and right seperate from top and bottom padding.
- Update: Container border has top, right, bottom, left width options.
Download this release
Release Info
Developer | britner |
Plugin | Kadence WooCommerce Email Designer |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.2 to 1.3.0
- assets/css/customizer-styles.css +9 -0
- assets/js/customizer-scripts.js +18 -7
- includes/class-kadence-woomail-customizer.php +234 -107
- includes/class-kadence-woomail-preview.php +19 -8
- includes/class-kadence-woomail-settings.php +1054 -543
- includes/class-kadence-woomail-woo.php +23 -15
- kadence-woocommerce-email-designer.php +42 -20
- preview.php +19 -18
- readme.txt +11 -1
- templates/woo/emails/admin-cancelled-order.php +31 -24
- templates/woo/emails/admin-failed-order.php +8 -1
- templates/woo/emails/admin-new-order.php +8 -1
- templates/woo/emails/admin-new-renewal-order.php +7 -0
- templates/woo/emails/cancelled-subscription.php +94 -44
- templates/woo/emails/customer-completed-order.php +7 -0
- templates/woo/emails/customer-completed-renewal-order.php +11 -2
- templates/woo/emails/customer-completed-switch-order.php +11 -2
- templates/woo/emails/customer-invoice.php +11 -3
- templates/woo/emails/customer-new-account.php +20 -6
- templates/woo/emails/customer-note.php +8 -1
- templates/woo/emails/customer-on-hold-order.php +7 -0
- templates/woo/emails/customer-processing-order.php +7 -0
- templates/woo/emails/customer-processing-renewal-order.php +11 -2
- templates/woo/emails/customer-refunded-order.php +7 -0
- templates/woo/emails/customer-renewal-invoice.php +10 -2
- templates/woo/emails/customer-reset-password.php +23 -6
- templates/woo/emails/email-addresses.php +100 -31
- templates/woo/emails/email-downloads.php +38 -19
- templates/woo/emails/email-footer.php +1 -1
- templates/woo/emails/email-header.php +51 -22
- templates/woo/emails/email-order-details.php +264 -104
- templates/woo/emails/email-order-items.php +197 -0
- templates/woo/emails/email-styles.php +39 -13
- templates/woo/emails/subscription-info.php +66 -28
assets/css/customizer-styles.css
CHANGED
@@ -150,4 +150,13 @@
|
|
150 |
margin: 10px 0;
|
151 |
padding: 10px;
|
152 |
font-size: 12px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
}
|
150 |
margin: 10px 0;
|
151 |
padding: 10px;
|
152 |
font-size: 12px;
|
153 |
+
}
|
154 |
+
|
155 |
+
.preview-mobile .wp-full-overlay-main {
|
156 |
+
margin: auto 0 auto -190px;
|
157 |
+
width: 380px;
|
158 |
+
height: 580px;
|
159 |
+
max-height: 100%;
|
160 |
+
max-width: 100%;
|
161 |
+
left: 50%;
|
162 |
}
|
assets/js/customizer-scripts.js
CHANGED
@@ -99,20 +99,31 @@ jQuery(document).ready(function() {
|
|
99 |
function custom_size_mobile() {
|
100 |
// get email width.
|
101 |
var email_width = parseInt( jQuery('#customize-control-kt_woomail_content_width .range-slider__range').val() );
|
102 |
-
var ratio = email_width
|
103 |
var framescale = 100/ratio;
|
104 |
var framescale = framescale/100;
|
105 |
jQuery('#customize-preview iframe').width(email_width+'px');
|
106 |
jQuery('#customize-preview iframe').css({
|
107 |
-
'-webkit-transform' : 'scale(' +
|
108 |
-
'-moz-transform' : 'scale(' +
|
109 |
-
'-ms-transform' : 'scale(' +
|
110 |
-
'-o-transform' : 'scale(' +
|
111 |
-
'transform' : 'scale(' +
|
112 |
});
|
113 |
}
|
114 |
jQuery('#customize-footer-actions .preview-mobile').click(function(e) {
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
});
|
117 |
|
118 |
jQuery('#customize-footer-actions .preview-desktop').click(function(e) {
|
99 |
function custom_size_mobile() {
|
100 |
// get email width.
|
101 |
var email_width = parseInt( jQuery('#customize-control-kt_woomail_content_width .range-slider__range').val() );
|
102 |
+
var ratio = 380/email_width;
|
103 |
var framescale = 100/ratio;
|
104 |
var framescale = framescale/100;
|
105 |
jQuery('#customize-preview iframe').width(email_width+'px');
|
106 |
jQuery('#customize-preview iframe').css({
|
107 |
+
'-webkit-transform' : 'scale(' + ratio + ')',
|
108 |
+
'-moz-transform' : 'scale(' + ratio + ')',
|
109 |
+
'-ms-transform' : 'scale(' + ratio + ')',
|
110 |
+
'-o-transform' : 'scale(' + ratio + ')',
|
111 |
+
'transform' : 'scale(' + ratio + ')'
|
112 |
});
|
113 |
}
|
114 |
jQuery('#customize-footer-actions .preview-mobile').click(function(e) {
|
115 |
+
if ( kt_woomail.responsive_mode ) {
|
116 |
+
jQuery('#customize-preview iframe').width('100%');
|
117 |
+
jQuery('#customize-preview iframe').css({
|
118 |
+
'-webkit-transform' : 'scale(1)',
|
119 |
+
'-moz-transform' : 'scale(1)',
|
120 |
+
'-ms-transform' : 'scale(1)',
|
121 |
+
'-o-transform' : 'scale(1)',
|
122 |
+
'transform' : 'scale(1)'
|
123 |
+
});
|
124 |
+
} else {
|
125 |
+
custom_size_mobile();
|
126 |
+
}
|
127 |
});
|
128 |
|
129 |
jQuery('#customize-footer-actions .preview-desktop').click(function(e) {
|
includes/class-kadence-woomail-customizer.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
exit;
|
5 |
}
|
6 |
|
@@ -11,14 +17,14 @@ if ( ! defined('ABSPATH') ) {
|
|
11 |
if ( ! class_exists( 'Kadence_Woomail_Customizer' ) ) {
|
12 |
|
13 |
class Kadence_Woomail_Customizer {
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
|
20 |
-
|
21 |
-
|
22 |
*/
|
23 |
private static $instance = null;
|
24 |
|
@@ -39,8 +45,11 @@ class Kadence_Woomail_Customizer {
|
|
39 |
* @return void
|
40 |
*/
|
41 |
public function __construct() {
|
|
|
|
|
|
|
42 |
// Add settings.
|
43 |
-
add_action('customize_register', array( $this, 'add_settings' ) );
|
44 |
|
45 |
// Maybe add custom styles to default WooCommerce styles.
|
46 |
add_filter( 'woocommerce_email_styles', array( $this, 'maybe_add_custom_styles' ), 99 );
|
@@ -86,10 +95,59 @@ class Kadence_Woomail_Customizer {
|
|
86 |
// Unhook divi front end.
|
87 |
add_action( 'woomail_footer', array( $this, 'unhook_divi' ), 10 );
|
88 |
|
89 |
-
// Unhook
|
90 |
-
add_action( '
|
|
|
|
|
|
|
91 |
|
92 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
/*
|
95 |
* Unhook Divi front end.
|
@@ -107,22 +165,29 @@ class Kadence_Woomail_Customizer {
|
|
107 |
wp_dequeue_style( 'flatsome-customizer-preview' );
|
108 |
wp_dequeue_script( 'flatsome-customizer-frontend-js' );
|
109 |
}
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
public function get_customizer_options_override_ready() {
|
119 |
foreach ( Kadence_Woomail_Settings::get_email_types() as $key => $value ) {
|
120 |
-
add_filter('pre_option_woocommerce_' . $key .'_settings', array( $this, 'customizer_woo_options_override'), 99, 2 );
|
121 |
}
|
122 |
}
|
123 |
public function customizer_woo_options_override( $value = array(), $option ) {
|
124 |
if ( isset( $_POST['customized'] ) ) {
|
125 |
-
|
126 |
if ( isset( $_POST['customized'] ) && ! empty( $post_values ) ) {
|
127 |
if ( is_array( $post_values ) ) {
|
128 |
foreach ( $post_values as $key => $current_value ) {
|
@@ -196,7 +261,7 @@ class Kadence_Woomail_Customizer {
|
|
196 |
* @return string
|
197 |
*/
|
198 |
public function change_site_name( $name ) {
|
199 |
-
return __('WooCommerce Emails', 'kadence-woocommerce-email-designer');
|
200 |
}
|
201 |
|
202 |
/**
|
@@ -295,13 +360,14 @@ class Kadence_Woomail_Customizer {
|
|
295 |
*/
|
296 |
public function enqueue_customizer_scripts() {
|
297 |
// Enqueue Customizer script
|
298 |
-
wp_enqueue_style('kt-woomail-customizer-styles', KT_WOOMAIL_URL . '/assets/css/customizer-styles.css', KT_WOOMAIL_VERSION );
|
299 |
-
wp_enqueue_script('kt-woomail-customizer-scripts', KT_WOOMAIL_URL . '/assets/js/customizer-scripts.js', array('jquery', 'customize-controls'), KT_WOOMAIL_VERSION, true);
|
300 |
|
301 |
// Send variables to Javascript
|
302 |
wp_localize_script('kt-woomail-customizer-scripts', 'kt_woomail', array(
|
303 |
-
'ajax_url'
|
304 |
-
'customizer_url'
|
|
|
305 |
'labels' => array(
|
306 |
'reset' => __('Reset', 'kadence-woocommerce-email-designer'),
|
307 |
'customtitle' => __('Woocommerce Emails', 'kadence-woocommerce-email-designer'),
|
@@ -597,7 +663,7 @@ class Kadence_Woomail_Customizer {
|
|
597 |
}
|
598 |
|
599 |
// Maybe add panel
|
600 |
-
Kadence_Woomail_Customizer::maybe_add_panel($wp_customize, $section);
|
601 |
|
602 |
// Maybe add section to panel
|
603 |
if ( ! empty( $section['panel'] ) ) {
|
@@ -621,7 +687,7 @@ class Kadence_Woomail_Customizer {
|
|
621 |
* @param array $child
|
622 |
* @return void
|
623 |
*/
|
624 |
-
|
625 |
// Get panels
|
626 |
$panels = Kadence_Woomail_Settings::get_panels();
|
627 |
// Check if panel is set and exists
|
@@ -657,60 +723,91 @@ class Kadence_Woomail_Customizer {
|
|
657 |
}
|
658 |
}
|
659 |
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
689 |
|
690 |
-
|
691 |
-
|
692 |
|
693 |
-
|
694 |
-
|
695 |
|
696 |
-
|
697 |
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
|
715 |
/**
|
716 |
* Get value for use in templates
|
@@ -727,7 +824,7 @@ class Kadence_Woomail_Customizer {
|
|
727 |
// Prepare value
|
728 |
$value = Kadence_Woomail_Customizer::prepare( $key, $stored_value, $selector );
|
729 |
|
730 |
-
// Allow developers to override
|
731 |
return apply_filters( 'kt_woomail_option_value', $value, $key, $selector, $stored_value );
|
732 |
}
|
733 |
|
@@ -768,6 +865,24 @@ class Kadence_Woomail_Customizer {
|
|
768 |
if ( $key === 'shadow' ) {
|
769 |
$value = '0 ' . ($value > 0 ? 1 : 0) . 'px ' . ($value * 4) . 'px ' . $value . 'px rgba(0,0,0,0.1) !important';
|
770 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
771 |
|
772 |
// Font family
|
773 |
if ( substr( $key, -11 ) === 'font_family' ) {
|
@@ -778,29 +893,39 @@ class Kadence_Woomail_Customizer {
|
|
778 |
return $value;
|
779 |
}
|
780 |
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
804 |
|
805 |
'header_padding_top' => 'px',
|
806 |
'header_padding_bottom' => 'px',
|
@@ -823,7 +948,8 @@ class Kadence_Woomail_Customizer {
|
|
823 |
'h3_font_size' => 'px',
|
824 |
'h3_line_height' => 'px',
|
825 |
|
826 |
-
'addresses_border_width'
|
|
|
827 |
|
828 |
'footer_top_padding' => 'px',
|
829 |
'footer_bottom_padding' => 'px',
|
@@ -840,6 +966,7 @@ class Kadence_Woomail_Customizer {
|
|
840 |
'items_table_border_width' => 'px',
|
841 |
'items_table_separator_width' => 'px',
|
842 |
'items_table_padding' => 'px',
|
|
|
843 |
);
|
844 |
}
|
845 |
|
@@ -935,21 +1062,21 @@ class Kadence_Woomail_Customizer {
|
|
935 |
* Maybe add custom styles to default WooCommerce styles
|
936 |
*
|
937 |
* @access public
|
938 |
-
* @param
|
939 |
* @return string
|
940 |
*/
|
941 |
public function maybe_add_custom_styles( $styles ) {
|
942 |
// Check if custom styles need to be applied.
|
943 |
if ( Kadence_Woomail_Designer::overwrite_options() ) {
|
944 |
|
945 |
-
// Add custom styles
|
946 |
$styles .= Kadence_Woomail_Customizer::get_styles_string();
|
947 |
|
948 |
-
// Static styles
|
949 |
$styles .= Kadence_Woomail_Customizer::get_static_styles();
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
$styles .= 'body { background-color: ' . get_option( 'woocommerce_email_background_color' ) . '; }';
|
954 |
$styles .= Kadence_Woomail_Customizer::get_static_styles();
|
955 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Customizer class.
|
4 |
+
*
|
5 |
+
* @package Kadence WooCommerce Email Designer
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Exit if accessed directly.
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
exit;
|
11 |
}
|
12 |
|
17 |
if ( ! class_exists( 'Kadence_Woomail_Customizer' ) ) {
|
18 |
|
19 |
class Kadence_Woomail_Customizer {
|
20 |
+
// Properties
|
21 |
+
private static $panels_added = array();
|
22 |
+
private static $sections_added = array();
|
23 |
+
private static $css_suffixes = null;
|
24 |
+
public static $customizer_url = null;
|
25 |
|
26 |
+
/**
|
27 |
+
* @var null
|
28 |
*/
|
29 |
private static $instance = null;
|
30 |
|
45 |
* @return void
|
46 |
*/
|
47 |
public function __construct() {
|
48 |
+
// Add support for third party emails.
|
49 |
+
add_action( 'init', array( $this, 'add_third_party_emails' ), 5 );
|
50 |
+
|
51 |
// Add settings.
|
52 |
+
add_action( 'customize_register', array( $this, 'add_settings' ) );
|
53 |
|
54 |
// Maybe add custom styles to default WooCommerce styles.
|
55 |
add_filter( 'woocommerce_email_styles', array( $this, 'maybe_add_custom_styles' ), 99 );
|
95 |
// Unhook divi front end.
|
96 |
add_action( 'woomail_footer', array( $this, 'unhook_divi' ), 10 );
|
97 |
|
98 |
+
// Unhook LifterLMS front end.
|
99 |
+
add_action( 'woomail_footer', array( $this, 'unhook_lifter' ), 10 );
|
100 |
+
|
101 |
+
// Unhook Flatsome js.
|
102 |
+
add_action( 'customize_preview_init', array( $this, 'unhook_flatsome' ), 50 );
|
103 |
|
104 |
}
|
105 |
+
/**
|
106 |
+
* Add Emails into the previewer.
|
107 |
+
*/
|
108 |
+
public function add_third_party_emails() {
|
109 |
+
/**
|
110 |
+
Looking for Structure that looks like this:
|
111 |
+
array(
|
112 |
+
'email_type' => 'email_example_slug',
|
113 |
+
'email_name' => 'Email Example',
|
114 |
+
'email_class' => 'Custom_WC_Email_Extend',
|
115 |
+
'email_heading' => __( 'Placeholder for Heading', 'plugin' ),
|
116 |
+
);
|
117 |
+
*/
|
118 |
+
$add_email_previews = apply_filters( 'kadence_woocommerce_email_previews', array() );
|
119 |
+
if ( ! empty( $add_email_previews ) && is_array( $add_email_previews ) ) {
|
120 |
+
foreach ( $add_email_previews as $email_item ) {
|
121 |
+
if ( isset( $email_item['email_type'] ) && ! empty( $email_item['email_type'] ) && isset( $email_item['email_name'] ) && ! empty( $email_item['email_name'] ) ) {
|
122 |
+
add_filter(
|
123 |
+
'kadence_woomail_email_types',
|
124 |
+
function( $types ) use ( $email_item ) {
|
125 |
+
$types[ $email_item['email_type'] ] = $email_item['email_name'];
|
126 |
+
return $types;
|
127 |
+
}
|
128 |
+
);
|
129 |
+
}
|
130 |
+
if ( isset( $email_item['email_type'] ) && ! empty( $email_item['email_type'] ) && isset( $email_item['email_class'] ) && ! empty( $email_item['email_class'] ) ) {
|
131 |
+
add_filter(
|
132 |
+
'kadence_woomail_email_type_class_name_array',
|
133 |
+
function( $types ) use ( $email_item ) {
|
134 |
+
$types[ $email_item['email_type'] ] = $email_item['email_class'];
|
135 |
+
return $types;
|
136 |
+
}
|
137 |
+
);
|
138 |
+
}
|
139 |
+
if ( isset( $email_item['email_type'] ) && ! empty( $email_item['email_type'] ) && isset( $email_item['email_heading'] ) && ! empty( $email_item['email_heading'] ) ) {
|
140 |
+
add_filter(
|
141 |
+
'kadence_woomail_email_settings_default_values',
|
142 |
+
function( $placeholders ) use ( $email_item ) {
|
143 |
+
$placeholders[ $email_item['email_type'] . '_heading' ] = $email_item['email_heading'];
|
144 |
+
return $placeholders;
|
145 |
+
}
|
146 |
+
);
|
147 |
+
}
|
148 |
+
}
|
149 |
+
}
|
150 |
+
}
|
151 |
|
152 |
/*
|
153 |
* Unhook Divi front end.
|
165 |
wp_dequeue_style( 'flatsome-customizer-preview' );
|
166 |
wp_dequeue_script( 'flatsome-customizer-frontend-js' );
|
167 |
}
|
168 |
+
/*
|
169 |
+
* Unhook lifter front end.
|
170 |
+
*/
|
171 |
+
public function unhook_lifter() {
|
172 |
+
// Unhook LLMs issue.
|
173 |
+
wp_dequeue_script( 'llms' );
|
174 |
+
}
|
175 |
+
/*
|
176 |
+
* Unhook Divi front end.
|
177 |
+
*/
|
178 |
+
public function unhook_divi() {
|
179 |
+
// Divi Theme issue.
|
180 |
+
remove_action( 'wp_footer', 'et_builder_get_modules_js_data' );
|
181 |
+
remove_action( 'et_customizer_footer_preview', 'et_load_social_icons' );
|
182 |
+
}
|
183 |
public function get_customizer_options_override_ready() {
|
184 |
foreach ( Kadence_Woomail_Settings::get_email_types() as $key => $value ) {
|
185 |
+
add_filter('pre_option_woocommerce_' . $key .'_settings', array( $this, 'customizer_woo_options_override' ), 99, 2 );
|
186 |
}
|
187 |
}
|
188 |
public function customizer_woo_options_override( $value = array(), $option ) {
|
189 |
if ( isset( $_POST['customized'] ) ) {
|
190 |
+
$post_values = json_decode( stripslashes_deep( $_POST['customized'] ), true );
|
191 |
if ( isset( $_POST['customized'] ) && ! empty( $post_values ) ) {
|
192 |
if ( is_array( $post_values ) ) {
|
193 |
foreach ( $post_values as $key => $current_value ) {
|
261 |
* @return string
|
262 |
*/
|
263 |
public function change_site_name( $name ) {
|
264 |
+
return __( 'WooCommerce Emails', 'kadence-woocommerce-email-designer' );
|
265 |
}
|
266 |
|
267 |
/**
|
360 |
*/
|
361 |
public function enqueue_customizer_scripts() {
|
362 |
// Enqueue Customizer script
|
363 |
+
wp_enqueue_style( 'kt-woomail-customizer-styles', KT_WOOMAIL_URL . '/assets/css/customizer-styles.css', KT_WOOMAIL_VERSION );
|
364 |
+
wp_enqueue_script( 'kt-woomail-customizer-scripts', KT_WOOMAIL_URL . '/assets/js/customizer-scripts.js', array('jquery', 'customize-controls' ), KT_WOOMAIL_VERSION, true);
|
365 |
|
366 |
// Send variables to Javascript
|
367 |
wp_localize_script('kt-woomail-customizer-scripts', 'kt_woomail', array(
|
368 |
+
'ajax_url' => admin_url('admin-ajax.php'),
|
369 |
+
'customizer_url' => Kadence_Woomail_Customizer::get_customizer_url(),
|
370 |
+
'responsive_mode' => Kadence_Woomail_Customizer::opt( 'responsive_mode' ),
|
371 |
'labels' => array(
|
372 |
'reset' => __('Reset', 'kadence-woocommerce-email-designer'),
|
373 |
'customtitle' => __('Woocommerce Emails', 'kadence-woocommerce-email-designer'),
|
663 |
}
|
664 |
|
665 |
// Maybe add panel
|
666 |
+
Kadence_Woomail_Customizer::maybe_add_panel( $wp_customize, $section );
|
667 |
|
668 |
// Maybe add section to panel
|
669 |
if ( ! empty( $section['panel'] ) ) {
|
687 |
* @param array $child
|
688 |
* @return void
|
689 |
*/
|
690 |
+
public static function maybe_add_panel( $wp_customize, $child ) {
|
691 |
// Get panels
|
692 |
$panels = Kadence_Woomail_Settings::get_panels();
|
693 |
// Check if panel is set and exists
|
723 |
}
|
724 |
}
|
725 |
|
726 |
+
/**
|
727 |
+
* Get styles string
|
728 |
+
*
|
729 |
+
* @access public
|
730 |
+
* @param bool $add_custom_css
|
731 |
+
* @return string
|
732 |
+
*/
|
733 |
+
public static function get_styles_string( $add_custom_css = true ) {
|
734 |
+
$styles_array = array();
|
735 |
+
$styles = '';
|
736 |
+
$responsive_check = Kadence_Woomail_Customizer::opt( 'responsive_mode' );
|
737 |
+
|
738 |
+
// Iterate over settings.
|
739 |
+
foreach ( Kadence_Woomail_Settings::get_settings() as $setting_key => $setting ) {
|
740 |
+
|
741 |
+
// Only add CSS properties.
|
742 |
+
if ( isset( $setting['live_method']) && $setting['live_method'] === 'css' ) {
|
743 |
+
|
744 |
+
// Iterate over selectors.
|
745 |
+
foreach ( $setting['selectors'] as $selector => $properties ) {
|
746 |
+
|
747 |
+
// Iterate over properties.
|
748 |
+
foreach ( $properties as $property ) {
|
749 |
+
// Add value to styles array.
|
750 |
+
if ( $responsive_check && 'content_width' == $setting_key ) {
|
751 |
+
$property = 'max-width';
|
752 |
+
if ( '#template_container' !== $selector ) {
|
753 |
+
continue;
|
754 |
+
}
|
755 |
+
}
|
756 |
+
if ( 'border_width' == $setting_key ) {
|
757 |
+
if ( '' === Kadence_Woomail_Customizer::get_stored_value( 'border_width_right' ) ) {
|
758 |
+
$property = 'border-width';
|
759 |
+
} else if ( '0' === Kadence_Woomail_Customizer::get_stored_value( 'border_width' ) ) {
|
760 |
+
$property = 'border-top';
|
761 |
+
}
|
762 |
+
}
|
763 |
+
if ( 'border_width_right' == $setting_key && '0' === Kadence_Woomail_Customizer::get_stored_value( 'border_width_right' ) ) {
|
764 |
+
$property = 'border-right';
|
765 |
+
}
|
766 |
+
if ( 'border_width_left' == $setting_key && '0' === Kadence_Woomail_Customizer::get_stored_value( 'border_width_left' ) ) {
|
767 |
+
$property = 'border-left';
|
768 |
+
}
|
769 |
+
if ( 'border_width_bottom' == $setting_key && '0' === Kadence_Woomail_Customizer::get_stored_value( 'border_width_bottom' ) ) {
|
770 |
+
$property = 'border-bottom';
|
771 |
+
}
|
772 |
+
|
773 |
+
if ( 'items_table_padding' == $setting_key && ( '.order-items-normal #body_content_inner table.td th' === $selector || '.order-items-normal #body_content_inner table.td td' === $selector ) ) {
|
774 |
+
if ( '' === Kadence_Woomail_Customizer::get_stored_value( 'items_table_padding_left_right' ) ) {
|
775 |
+
$property = 'padding';
|
776 |
+
}
|
777 |
+
}
|
778 |
+
if ( ! $responsive_check && 'content_inner_width' == $setting_key ) {
|
779 |
+
continue;
|
780 |
+
}
|
781 |
+
$styles_array[ $selector ][ $property ] = Kadence_Woomail_Customizer::opt( $setting_key, $selector );
|
782 |
+
}
|
783 |
+
}
|
784 |
+
}
|
785 |
+
}
|
786 |
|
787 |
+
// Join property names with values.
|
788 |
+
foreach ( $styles_array as $selector => $properties ) {
|
789 |
|
790 |
+
// Open selector.
|
791 |
+
$styles .= $selector . '{';
|
792 |
|
793 |
+
foreach ( $properties as $property_key => $property_value ) {
|
794 |
|
795 |
+
// Add property.
|
796 |
+
$styles .= $property_key . ':' . $property_value . ';';
|
797 |
+
}
|
798 |
|
799 |
+
// Close selector.
|
800 |
+
$styles .= '}';
|
801 |
+
}
|
802 |
|
803 |
+
// Add custom CSS
|
804 |
+
if ( $add_custom_css ) {
|
805 |
+
$styles .= Kadence_Woomail_Customizer::opt( 'custom_css' );
|
806 |
+
}
|
807 |
|
808 |
+
// Return styles string
|
809 |
+
return $styles;
|
810 |
+
}
|
811 |
|
812 |
/**
|
813 |
* Get value for use in templates
|
824 |
// Prepare value
|
825 |
$value = Kadence_Woomail_Customizer::prepare( $key, $stored_value, $selector );
|
826 |
|
827 |
+
// Allow developers to override.
|
828 |
return apply_filters( 'kt_woomail_option_value', $value, $key, $selector, $stored_value );
|
829 |
}
|
830 |
|
865 |
if ( $key === 'shadow' ) {
|
866 |
$value = '0 ' . ($value > 0 ? 1 : 0) . 'px ' . ($value * 4) . 'px ' . $value . 'px rgba(0,0,0,0.1) !important';
|
867 |
}
|
868 |
+
|
869 |
+
// Special case for border width 0.
|
870 |
+
if ( $key === 'border_width_right' && '0px' === $value ) {
|
871 |
+
$background = get_option( 'woocommerce_email_background_color' );
|
872 |
+
$value = '0px solid ' . $background . ' !important';
|
873 |
+
}
|
874 |
+
if ( $key === 'border_width_left' && '0px' === $value ) {
|
875 |
+
$background = get_option( 'woocommerce_email_background_color' );
|
876 |
+
$value = '0px solid ' . $background . ' !important';
|
877 |
+
}
|
878 |
+
if ( $key === 'border_width_bottom' && '0px' === $value ) {
|
879 |
+
$background = get_option( 'woocommerce_email_background_color' );
|
880 |
+
$value = '0px solid ' . $background . ' !important';
|
881 |
+
}
|
882 |
+
if ( $key === 'border_width' && '0px' === $value ) {
|
883 |
+
$background = get_option( 'woocommerce_email_background_color' );
|
884 |
+
$value = '0px solid ' . $background . ' !important';
|
885 |
+
}
|
886 |
|
887 |
// Font family
|
888 |
if ( substr( $key, -11 ) === 'font_family' ) {
|
893 |
return $value;
|
894 |
}
|
895 |
|
896 |
+
/**
|
897 |
+
* Get CSS suffix by key or all CSS suffixes
|
898 |
+
*
|
899 |
+
* @access public
|
900 |
+
* @param string $key
|
901 |
+
* @return mixed
|
902 |
+
*/
|
903 |
+
public static function get_css_suffix( $key = null ) {
|
904 |
+
// Define CSS suffixes.
|
905 |
+
if ( null === self::$css_suffixes ) {
|
906 |
+
self::$css_suffixes = array(
|
907 |
+
'email_padding' => 'px',
|
908 |
+
'email_padding_bottom' => 'px',
|
909 |
+
'content_padding_top' => 'px',
|
910 |
+
'content_padding_bottom' => 'px',
|
911 |
+
'content_padding' => 'px',
|
912 |
+
|
913 |
+
'content_width' => 'px',
|
914 |
+
'content_inner_width' => 'px',
|
915 |
+
'border_width' => 'px',
|
916 |
+
'border_width_right' => 'px',
|
917 |
+
'border_width_bottom' => 'px',
|
918 |
+
'border_width_left' => 'px',
|
919 |
+
'border_radius' => 'px !important',
|
920 |
+
|
921 |
+
'btn_border_width' => 'px',
|
922 |
+
'btn_size' => 'px',
|
923 |
+
'btn_left_right_padding' => 'px',
|
924 |
+
'btn_top_bottom_padding' => 'px',
|
925 |
+
'btn_border_radius' => 'px',
|
926 |
+
|
927 |
+
'header_image_maxwidth' => 'px',
|
928 |
+
'header_image_padding_top_bottom' => 'px',
|
929 |
|
930 |
'header_padding_top' => 'px',
|
931 |
'header_padding_bottom' => 'px',
|
948 |
'h3_font_size' => 'px',
|
949 |
'h3_line_height' => 'px',
|
950 |
|
951 |
+
'addresses_border_width' => 'px',
|
952 |
+
'addresses_padding' => 'px',
|
953 |
|
954 |
'footer_top_padding' => 'px',
|
955 |
'footer_bottom_padding' => 'px',
|
966 |
'items_table_border_width' => 'px',
|
967 |
'items_table_separator_width' => 'px',
|
968 |
'items_table_padding' => 'px',
|
969 |
+
'items_table_padding_left_right' => 'px',
|
970 |
);
|
971 |
}
|
972 |
|
1062 |
* Maybe add custom styles to default WooCommerce styles
|
1063 |
*
|
1064 |
* @access public
|
1065 |
+
* @param string $styles
|
1066 |
* @return string
|
1067 |
*/
|
1068 |
public function maybe_add_custom_styles( $styles ) {
|
1069 |
// Check if custom styles need to be applied.
|
1070 |
if ( Kadence_Woomail_Designer::overwrite_options() ) {
|
1071 |
|
1072 |
+
// Add custom styles.
|
1073 |
$styles .= Kadence_Woomail_Customizer::get_styles_string();
|
1074 |
|
1075 |
+
// Static styles.
|
1076 |
$styles .= Kadence_Woomail_Customizer::get_static_styles();
|
1077 |
+
|
1078 |
+
} else if ( Kadence_Woomail_Designer::is_own_preview_request() ) {
|
1079 |
+
// Otherwise apply some fixes for Customizer Preview.
|
1080 |
$styles .= 'body { background-color: ' . get_option( 'woocommerce_email_background_color' ) . '; }';
|
1081 |
$styles .= Kadence_Woomail_Customizer::get_static_styles();
|
1082 |
}
|
includes/class-kadence-woomail-preview.php
CHANGED
@@ -194,6 +194,7 @@ if ( ! class_exists( 'Kadence_Woomail_Preview' ) ) {
|
|
194 |
/**
|
195 |
* Get the email class name
|
196 |
*
|
|
|
197 |
*/
|
198 |
public static function get_email_class_name( $email_template ) {
|
199 |
$class_names = apply_filters( 'kadence_woomail_email_type_class_name_array', self::$email_types_class_names );
|
@@ -738,6 +739,8 @@ if ( ! class_exists( 'Kadence_Woomail_Preview' ) ) {
|
|
738 |
* @return void
|
739 |
*/
|
740 |
public static function print_live_preview_scripts() {
|
|
|
|
|
741 |
// Open container
|
742 |
$scripts = '<script type="text/javascript">jQuery(document).ready(function() {';
|
743 |
|
@@ -822,6 +825,15 @@ if ( ! class_exists( 'Kadence_Woomail_Preview' ) ) {
|
|
822 |
|
823 |
// CSS value change
|
824 |
if ( ! isset( $setting['live_method'] ) || $setting['live_method'] === 'css' ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
825 |
$scripts .= "wp.customize('kt_woomail[$setting_key]', function(value) {
|
826 |
value.bind(function(newval) {
|
827 |
newval = newval + (typeof suffixes['$setting_key'] !== 'undefined' ? suffixes['$setting_key'] : '');
|
@@ -874,7 +886,7 @@ if ( ! class_exists( 'Kadence_Woomail_Preview' ) ) {
|
|
874 |
// Iterate over properties
|
875 |
foreach ( $properties as $property ) {
|
876 |
|
877 |
-
// CSS value change
|
878 |
if ( ! isset( $setting['live_method'] ) || $setting['live_method'] === 'css' ) {
|
879 |
$scripts .= "wp.customize('$setting_key', function(value) {
|
880 |
value.bind(function(newval) {
|
@@ -885,8 +897,8 @@ if ( ! class_exists( 'Kadence_Woomail_Preview' ) ) {
|
|
885 |
});";
|
886 |
}
|
887 |
|
888 |
-
// DOM object property
|
889 |
-
if ( $setting['live_method']
|
890 |
$scripts .= "wp.customize('$setting_key', function(value) {
|
891 |
value.bind(function(newval) {
|
892 |
newval = newval + (typeof suffixes['$setting_key'] !== 'undefined' ? suffixes['$setting_key'] : '');
|
@@ -898,11 +910,10 @@ if ( ! class_exists( 'Kadence_Woomail_Preview' ) ) {
|
|
898 |
}
|
899 |
}
|
900 |
}
|
901 |
-
|
902 |
-
|
903 |
-
if ( $setting['live_method'] === 'replace' && ! empty( $setting[ 'selectors' ] ) ) {
|
904 |
foreach ( $setting['selectors'] as $selector ) {
|
905 |
-
$original = ( ! empty( $setting['
|
906 |
$scripts .= "wp.customize('$setting_key', function(value) {
|
907 |
value.bind(function(newval) {
|
908 |
newval = (newval !== '' ? newval : $original);
|
@@ -915,7 +926,7 @@ if ( ! class_exists( 'Kadence_Woomail_Preview' ) ) {
|
|
915 |
}
|
916 |
}
|
917 |
|
918 |
-
// Close container and return
|
919 |
echo $scripts . '});</script>';
|
920 |
}
|
921 |
|
194 |
/**
|
195 |
* Get the email class name
|
196 |
*
|
197 |
+
* @param string $email_template the email template slug.
|
198 |
*/
|
199 |
public static function get_email_class_name( $email_template ) {
|
200 |
$class_names = apply_filters( 'kadence_woomail_email_type_class_name_array', self::$email_types_class_names );
|
739 |
* @return void
|
740 |
*/
|
741 |
public static function print_live_preview_scripts() {
|
742 |
+
|
743 |
+
$responsive_check = Kadence_Woomail_Customizer::opt( 'responsive_mode' );
|
744 |
// Open container
|
745 |
$scripts = '<script type="text/javascript">jQuery(document).ready(function() {';
|
746 |
|
825 |
|
826 |
// CSS value change
|
827 |
if ( ! isset( $setting['live_method'] ) || $setting['live_method'] === 'css' ) {
|
828 |
+
if ( $responsive_check && 'content_width'== $setting_key ) {
|
829 |
+
$property = 'max-width';
|
830 |
+
if ( '#template_container' !== $selector ) {
|
831 |
+
continue;
|
832 |
+
}
|
833 |
+
}
|
834 |
+
if ( ! $responsive_check && 'content_inner_width' == $setting_key ) {
|
835 |
+
continue;
|
836 |
+
}
|
837 |
$scripts .= "wp.customize('kt_woomail[$setting_key]', function(value) {
|
838 |
value.bind(function(newval) {
|
839 |
newval = newval + (typeof suffixes['$setting_key'] !== 'undefined' ? suffixes['$setting_key'] : '');
|
886 |
// Iterate over properties
|
887 |
foreach ( $properties as $property ) {
|
888 |
|
889 |
+
// CSS value change.
|
890 |
if ( ! isset( $setting['live_method'] ) || $setting['live_method'] === 'css' ) {
|
891 |
$scripts .= "wp.customize('$setting_key', function(value) {
|
892 |
value.bind(function(newval) {
|
897 |
});";
|
898 |
}
|
899 |
|
900 |
+
// DOM object property.
|
901 |
+
if ( 'property' === $setting['live_method'] ) {
|
902 |
$scripts .= "wp.customize('$setting_key', function(value) {
|
903 |
value.bind(function(newval) {
|
904 |
newval = newval + (typeof suffixes['$setting_key'] !== 'undefined' ? suffixes['$setting_key'] : '');
|
910 |
}
|
911 |
}
|
912 |
}
|
913 |
+
// HTML Replace.
|
914 |
+
if ( 'replace' === $setting['live_method'] && ! empty( $setting['selectors'] ) ) {
|
|
|
915 |
foreach ( $setting['selectors'] as $selector ) {
|
916 |
+
$original = ( isset( $setting['input_attrs'] ) && isset( $setting['input_attrs']['placeholder'] ) && ! empty( $setting['input_attrs']['placeholder'] ) ? json_encode( $setting['input_attrs']['placeholder'] ) : '"Placeholder Text"' );
|
917 |
$scripts .= "wp.customize('$setting_key', function(value) {
|
918 |
value.bind(function(newval) {
|
919 |
newval = (newval !== '' ? newval : $original);
|
926 |
}
|
927 |
}
|
928 |
|
929 |
+
// Close container and return.
|
930 |
echo $scripts . '});</script>';
|
931 |
}
|
932 |
|
includes/class-kadence-woomail-settings.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Customizer Mail Settings
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
/**
|
@@ -17,30 +19,89 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
17 |
*/
|
18 |
class Kadence_Woomail_Settings {
|
19 |
/**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
* @var null
|
21 |
*/
|
22 |
-
private static $panels = null;
|
23 |
-
private static $sections = null;
|
24 |
-
private static $settings = null;
|
25 |
private static $woo_copy_settings = null;
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
private static $customized_email_types = null;
|
31 |
|
32 |
-
|
|
|
|
|
|
|
|
|
33 |
public static $font_family_mapping = array(
|
34 |
-
'helvetica'
|
35 |
-
'arial'
|
36 |
-
'arial_black'
|
37 |
-
'courier'
|
38 |
-
'impact'
|
39 |
-
'lucida'
|
40 |
-
'palatino'
|
41 |
-
'georgia'
|
42 |
);
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
44 |
public static $email_types_mapping = array(
|
45 |
'new_order' => 'New Order',
|
46 |
'cancelled_order' => 'Cancelled Order',
|
@@ -54,16 +115,26 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
54 |
'customer_note' => 'Customer Note',
|
55 |
'customer_reset_password' => 'Customer Reset Password',
|
56 |
);
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
58 |
public static $subscription_email_types_mapping = array(
|
59 |
-
'new_renewal_order'
|
60 |
'customer_processing_renewal_order' => 'Customer Processing Renewal Order',
|
61 |
-
'customer_completed_renewal_order'
|
62 |
-
'customer_completed_switch_order'
|
63 |
-
'customer_renewal_invoice'
|
64 |
-
'cancelled_subscription'
|
65 |
);
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
67 |
public static $membership_email_types_mapping = array(
|
68 |
'WC_Memberships_User_Membership_Note_Email' => 'User Membership Note',
|
69 |
'WC_Memberships_User_Membership_Ending_Soon_Email' => 'User Membership Ending Soon',
|
@@ -71,7 +142,11 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
71 |
'WC_Memberships_User_Membership_Renewal_Reminder_Email' => 'User Membership Renewal Reminder',
|
72 |
'WC_Memberships_User_Membership_Activated_Email' => 'User Membership Activated',
|
73 |
);
|
74 |
-
|
|
|
|
|
|
|
|
|
75 |
public static $marketplace_email_types_mapping = array(
|
76 |
'vendor_new_account' => 'New Vendor Account',
|
77 |
'admin_new_vendor' => 'Admin New Vendor Account',
|
@@ -87,24 +162,39 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
87 |
'vendor_orders_stats_report' => 'Vendor orders stats report',
|
88 |
'vendor_contact_widget_email' => 'Vendor Contact Email',
|
89 |
);
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
public static $waitlist_email_types_mapping = array(
|
105 |
'woocommerce_waitlist_mailout' => 'Waitlist Mailout',
|
106 |
);
|
107 |
|
|
|
|
|
|
|
|
|
|
|
108 |
public static $prebuilt_templates_mapping = array(
|
109 |
'kt_full' => 'assets/images/kt_full_template.jpg',
|
110 |
'kt_skinny' => 'assets/images/kt_skinny_template.jpg',
|
@@ -146,75 +236,76 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
146 |
}
|
147 |
|
148 |
/**
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
public static function get_sections() {
|
155 |
-
// Define sections
|
156 |
if ( is_null( self::$sections ) ) {
|
157 |
self::$sections = array(
|
158 |
'template' => array(
|
159 |
-
'title'
|
160 |
-
'priority'
|
161 |
),
|
|
|
162 |
'mtype' => array(
|
163 |
-
'title'
|
164 |
-
'priority'
|
165 |
),
|
166 |
-
// Container
|
167 |
'container' => array(
|
168 |
-
'title'
|
169 |
-
'priority'
|
170 |
),
|
171 |
|
172 |
-
// Header Style
|
173 |
'header_style' => array(
|
174 |
-
'title'
|
175 |
-
'panel'
|
176 |
-
'priority'
|
177 |
),
|
178 |
|
179 |
-
// Header Image
|
180 |
'header_image' => array(
|
181 |
-
'title'
|
182 |
-
'panel'
|
183 |
-
'priority'
|
184 |
),
|
185 |
|
186 |
-
// Heading
|
187 |
'heading' => array(
|
188 |
-
'title'
|
189 |
-
'panel'
|
190 |
-
'priority'
|
191 |
),
|
192 |
|
193 |
-
// Footer Style
|
194 |
'footer_style' => array(
|
195 |
-
'title'
|
196 |
-
'panel'
|
197 |
-
'priority'
|
198 |
),
|
199 |
-
// Footer social
|
200 |
'footer_social' => array(
|
201 |
'title' => __( 'Footer Social', 'kadence-woocommerce-email-designer' ),
|
202 |
'panel' => 'footer',
|
203 |
'priority' => 50,
|
204 |
),
|
205 |
-
// Footer Content
|
206 |
'footer_content' => array(
|
207 |
'title' => __( 'Footer Credit Content', 'kadence-woocommerce-email-designer' ),
|
208 |
'panel' => 'footer',
|
209 |
'priority' => 60,
|
210 |
),
|
211 |
-
|
212 |
-
// Content Container
|
213 |
'content_container' => array(
|
214 |
'title' => __( 'Content Container', 'kadence-woocommerce-email-designer' ),
|
215 |
'panel' => 'content',
|
216 |
'priority' => 5,
|
217 |
),
|
|
|
218 |
'headings_style' => array(
|
219 |
'title' => __( 'Content Headings Style', 'kadence-woocommerce-email-designer' ),
|
220 |
'panel' => 'content',
|
@@ -244,6 +335,12 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
244 |
'panel' => 'content',
|
245 |
'priority' => 5,
|
246 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
// Custom Styles.
|
248 |
'custom_styles' => array(
|
249 |
'title' => __( 'Custom Styles', 'kadence-woocommerce-email-designer' ),
|
@@ -278,7 +375,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
278 |
|
279 |
// Email header image.
|
280 |
$base_options[ 'woocommerce_email_header_image' ] = array(
|
281 |
-
'title' => __('Header Image', 'kadence-woocommerce-email-designer'),
|
282 |
'control_type' => 'image',
|
283 |
'section' => 'header_image',
|
284 |
'default' => self::get_default_value( 'header_image' ),
|
@@ -291,48 +388,48 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
291 |
);
|
292 |
// Email background color
|
293 |
$base_options['woocommerce_email_background_color'] = array(
|
294 |
-
'title' => __('Container Background color', 'kadence-woocommerce-email-designer'),
|
295 |
'section' => 'container',
|
296 |
'control_type' => 'color',
|
297 |
'priority' => 5,
|
298 |
-
'default' => self::get_default_value('body_background_color'),
|
299 |
'live_method' => 'css',
|
300 |
'selectors' => array(
|
301 |
-
'body' => array('background-color'),
|
302 |
-
'#wrapper' => array('background-color'),
|
303 |
),
|
304 |
);
|
305 |
// Email text color
|
306 |
$base_options['woocommerce_email_text_color'] = array(
|
307 |
-
'title' => __('Content Text color', 'kadence-woocommerce-email-designer'),
|
308 |
'section' => 'text_style',
|
309 |
'control_type' => 'color',
|
310 |
-
'default' => self::get_default_value('text_color'),
|
311 |
'live_method' => 'css',
|
312 |
'selectors' => array(
|
313 |
-
'#body_content_inner' => array('color'),
|
314 |
-
'.td' => array('color'),
|
315 |
-
'.text' => array('color'),
|
316 |
-
'address' => array('color'),
|
317 |
),
|
318 |
);
|
319 |
// Email body background color
|
320 |
$base_options['woocommerce_email_body_background_color'] = array(
|
321 |
-
'title' => __('Content Background color', 'kadence-woocommerce-email-designer'),
|
322 |
'section' => 'content_container',
|
323 |
'control_type' => 'color',
|
324 |
'priority' => 5,
|
325 |
-
'default' => self::get_default_value('background_color'),
|
326 |
'live_method' => 'css',
|
327 |
'selectors' => array(
|
328 |
-
'#body_content' => array('background-color'),
|
329 |
-
'#template_container' => array('background-color'),
|
330 |
-
'h2 .separator-bubble' => array('background-color')
|
331 |
),
|
332 |
);
|
333 |
// Footer Content Footer text
|
334 |
$base_options['woocommerce_email_footer_text'] = array(
|
335 |
-
'title' => __('Footer text', 'kadence-woocommerce-email-designer'),
|
336 |
'type' => 'textarea',
|
337 |
'section' => 'footer_content',
|
338 |
'default' => self::get_default_value( 'footer_content_text' ),
|
@@ -347,7 +444,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
347 |
// Email recipients Text
|
348 |
if ( 'cancelled_order' == $key || 'new_order' == $key || 'failed_order' == $key ) {
|
349 |
$email_text['woocommerce_'.$key.'_settings[recipient]'] = array(
|
350 |
-
'title' => __('Recipient(s)', 'kadence-woocommerce-email-designer'),
|
351 |
'type' => 'text',
|
352 |
'section' => 'mtype',
|
353 |
'priority' => 5,
|
@@ -363,7 +460,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
363 |
if ( 'customer_refunded_order' == $key ) {
|
364 |
// Email Subject
|
365 |
$email_text['woocommerce_'.$key.'_settings[subject_full]'] = array(
|
366 |
-
'title' => __('Full refund subject', 'kadence-woocommerce-email-designer'),
|
367 |
'type' => 'text',
|
368 |
'section' => 'mtype',
|
369 |
'priority' => 5,
|
@@ -379,7 +476,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
379 |
);
|
380 |
// Email Subject
|
381 |
$email_text['woocommerce_'.$key.'_settings[subject_partial]'] = array(
|
382 |
-
'title' => __('Partial refund subject', 'kadence-woocommerce-email-designer'),
|
383 |
'type' => 'text',
|
384 |
'section' => 'mtype',
|
385 |
'priority' => 5,
|
@@ -395,7 +492,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
395 |
);
|
396 |
// Email Header Text
|
397 |
$email_text['woocommerce_'.$key.'_settings[heading_full]'] = array(
|
398 |
-
'title' => __('Full refund Heading Text', 'kadence-woocommerce-email-designer'),
|
399 |
'type' => 'text',
|
400 |
'section' => 'mtype',
|
401 |
'priority' => 5,
|
@@ -413,9 +510,9 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
413 |
'value' => $key,
|
414 |
),
|
415 |
);
|
416 |
-
// Email Header Text
|
417 |
-
$email_text['woocommerce_'
|
418 |
-
'title' => __('Partial refund Heading Text', 'kadence-woocommerce-email-designer'),
|
419 |
'type' => 'text',
|
420 |
'section' => 'mtype',
|
421 |
'priority' => 5,
|
@@ -430,15 +527,15 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
430 |
),
|
431 |
);
|
432 |
} else {
|
433 |
-
// Email Subject
|
434 |
-
$email_text['woocommerce_'
|
435 |
-
'title' => __('Subject Text', 'kadence-woocommerce-email-designer'),
|
436 |
'type' => 'text',
|
437 |
'section' => 'mtype',
|
438 |
'priority' => 5,
|
439 |
'default' => '',
|
440 |
'input_attrs' => array(
|
441 |
-
'placeholder' => self::get_default_value( $key.'_subject' ),
|
442 |
),
|
443 |
'active_callback' => array(
|
444 |
'id' => 'email_type',
|
@@ -447,8 +544,8 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
447 |
),
|
448 |
);
|
449 |
if ( 'customer_invoice' == $key ) {
|
450 |
-
$email_text['woocommerce_'
|
451 |
-
'title' => __('Subject (paid) Text', 'kadence-woocommerce-email-designer'),
|
452 |
'type' => 'text',
|
453 |
'section' => 'mtype',
|
454 |
'priority' => 5,
|
@@ -463,20 +560,18 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
463 |
),
|
464 |
);
|
465 |
}
|
466 |
-
// Email Header Text
|
467 |
-
$email_text['woocommerce_'
|
468 |
-
'title' => __('Heading Text', 'kadence-woocommerce-email-designer'),
|
469 |
'type' => 'text',
|
470 |
'section' => 'mtype',
|
471 |
'priority' => 5,
|
472 |
'default' => '',
|
473 |
-
'input_attrs'
|
474 |
-
'placeholder' => self::get_default_value( $key.'_heading' ),
|
475 |
),
|
476 |
'live_method' => 'replace',
|
477 |
-
'selectors' => array(
|
478 |
-
'#header_wrapper h1'
|
479 |
-
),
|
480 |
'active_callback' => array(
|
481 |
'id' => 'email_type',
|
482 |
'compare' => '==',
|
@@ -484,8 +579,8 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
484 |
),
|
485 |
);
|
486 |
if ( 'customer_invoice' == $key ) {
|
487 |
-
$email_text['woocommerce_'
|
488 |
-
'title' => __('Heading (paid) Text', 'kadence-woocommerce-email-designer'),
|
489 |
'type' => 'text',
|
490 |
'section' => 'mtype',
|
491 |
'priority' => 5,
|
@@ -500,9 +595,27 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
500 |
),
|
501 |
);
|
502 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
503 |
}
|
504 |
}
|
505 |
-
self::$woo_settings = array_merge($base_options, $email_text);
|
506 |
}
|
507 |
return self::$woo_settings;
|
508 |
}
|
@@ -534,7 +647,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
534 |
'type' => 'select',
|
535 |
'priority' => 1,
|
536 |
'choices' => self::get_order_ids(),
|
537 |
-
'default' => self::get_default_value('preview_order_id'),
|
538 |
'transport' => 'refresh',
|
539 |
),
|
540 |
// Email Type.
|
@@ -562,7 +675,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
562 |
foreach ( self::get_customized_email_types() as $key => $value ) {
|
563 |
// Email Subtitle Text
|
564 |
$extra_email_text[$key.'_subtitle'] = array(
|
565 |
-
'title' => __('Subtitle Text', 'kadence-woocommerce-email-designer'),
|
566 |
'type' => 'text',
|
567 |
'section' => 'mtype',
|
568 |
'default' => '',
|
@@ -577,10 +690,26 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
577 |
'value' => $key,
|
578 |
),
|
579 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
580 |
if ( 'customer_refunded_order' == $key ) {
|
581 |
// Email preview switch
|
582 |
$extra_email_text[$key.'_switch'] = array(
|
583 |
-
'title' => __('Switch off for Partial Refund Preview', 'kadence-woocommerce-email-designer'),
|
584 |
'control_type' => 'toggleswitch',
|
585 |
'section' => 'mtype',
|
586 |
'transport' => 'refresh',
|
@@ -595,7 +724,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
595 |
);
|
596 |
// Email Body Text
|
597 |
$extra_email_text[$key.'_body_full'] = array(
|
598 |
-
'title' => __('Body Full Refund Text', 'kadence-woocommerce-email-designer'),
|
599 |
'type' => 'textarea',
|
600 |
'section' => 'mtype',
|
601 |
'default' => self::get_default_value( $key.'_body_full' ),
|
@@ -609,7 +738,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
609 |
);
|
610 |
// Email Body Text
|
611 |
$extra_email_text[$key.'_body_partial'] = array(
|
612 |
-
'title' => __('Body Partial Refund Text', 'kadence-woocommerce-email-designer'),
|
613 |
'type' => 'textarea',
|
614 |
'section' => 'mtype',
|
615 |
'default' => self::get_default_value( $key.'_body_partial' ),
|
@@ -623,8 +752,8 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
623 |
);
|
624 |
} else if ( 'customer_invoice' == $key ) {
|
625 |
// Email preview switch
|
626 |
-
$extra_email_text[$key.'_switch'] = array(
|
627 |
-
'title' => __('Switch off for unpaid preview', 'kadence-woocommerce-email-designer'),
|
628 |
'control_type' => 'toggleswitch',
|
629 |
'section' => 'mtype',
|
630 |
'transport' => 'refresh',
|
@@ -637,9 +766,23 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
637 |
'value' => $key,
|
638 |
),
|
639 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
// Email Body Text
|
641 |
$extra_email_text[$key.'_body_paid'] = array(
|
642 |
-
'title' => __('Body Invoice Paid Text', 'kadence-woocommerce-email-designer'),
|
643 |
'type' => 'textarea',
|
644 |
'section' => 'mtype',
|
645 |
'default' => self::get_default_value( $key.'_body_paid' ),
|
@@ -653,7 +796,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
653 |
);
|
654 |
// Email Body Text
|
655 |
$extra_email_text[$key.'_body'] = array(
|
656 |
-
'title' => __('Body Invoice Pending Payment Text', 'kadence-woocommerce-email-designer'),
|
657 |
'type' => 'textarea',
|
658 |
'section' => 'mtype',
|
659 |
'default' => self::get_default_value( $key.'_body' ),
|
@@ -664,10 +807,24 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
664 |
'value' => $key,
|
665 |
),
|
666 |
);
|
667 |
-
}else if ( 'customer_renewal_invoice' == $key ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
668 |
// Email Body Text
|
669 |
$extra_email_text[$key.'_body_failed'] = array(
|
670 |
-
'title' => __('Body Invoice Failed Text', 'kadence-woocommerce-email-designer'),
|
671 |
'type' => 'textarea',
|
672 |
'section' => 'mtype',
|
673 |
'default' => self::get_default_value( $key.'_body_failed' ),
|
@@ -681,7 +838,35 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
681 |
);
|
682 |
// Email Body Text
|
683 |
$extra_email_text[$key.'_body'] = array(
|
684 |
-
'title' => __('Body Invoice Pending Payment Text', 'kadence-woocommerce-email-designer'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
'type' => 'textarea',
|
686 |
'section' => 'mtype',
|
687 |
'default' => self::get_default_value( $key.'_body' ),
|
@@ -694,11 +879,11 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
694 |
);
|
695 |
} else {
|
696 |
// Email Body Text.
|
697 |
-
$extra_email_text[$key . '_body'] = array(
|
698 |
'title' => __( 'Body Text', 'kadence-woocommerce-email-designer' ),
|
699 |
'type' => 'textarea',
|
700 |
'section' => 'mtype',
|
701 |
-
'default' => self::get_default_value( $key.'_body' ),
|
702 |
'original' => '',
|
703 |
'transport' => 'refresh',
|
704 |
'active_callback' => array(
|
@@ -713,33 +898,64 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
713 |
/* CONTAINER STUFF */
|
714 |
// Email width.
|
715 |
'content_width' => array(
|
716 |
-
'title' => __('Content Width', 'kadence-woocommerce-email-designer'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
717 |
'control_type' => 'rangevalue',
|
718 |
'section' => 'container',
|
719 |
-
'default' => self::get_default_value('content_width'),
|
720 |
'live_method' => 'css',
|
721 |
'selectors' => array(
|
722 |
-
'#template_container'
|
723 |
-
'#
|
724 |
-
'#
|
725 |
-
'#
|
726 |
-
'#template_footer' => array('width'),
|
727 |
),
|
728 |
'input_attrs' => array(
|
729 |
'step' => 2,
|
730 |
'min' => 350,
|
731 |
'max' => 1500,
|
732 |
),
|
|
|
|
|
|
|
|
|
|
|
733 |
),
|
734 |
// Border radius
|
735 |
'border_radius' => array(
|
736 |
-
'title' => __('Border radius', 'kadence-woocommerce-email-designer'),
|
737 |
'control_type' => 'rangevalue',
|
738 |
'section' => 'container',
|
739 |
-
'default' => self::get_default_value('border_radius'),
|
740 |
'live_method' => 'css',
|
|
|
741 |
'selectors' => array(
|
742 |
-
'#template_container' => array('border-radius'),
|
743 |
),
|
744 |
'input_attrs' => array(
|
745 |
'step' => 1,
|
@@ -747,15 +963,63 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
747 |
'max' => 100,
|
748 |
),
|
749 |
),
|
750 |
-
// Border Width
|
751 |
'border_width' => array(
|
752 |
-
'title' => __('Border Width', 'kadence-woocommerce-email-designer'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
753 |
'control_type' => 'rangevalue',
|
754 |
'section' => 'container',
|
755 |
-
'default' =>
|
756 |
'live_method' => 'css',
|
757 |
'selectors' => array(
|
758 |
-
'body #template_container'
|
759 |
),
|
760 |
'input_attrs' => array(
|
761 |
'step' => 1,
|
@@ -763,27 +1027,27 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
763 |
'max' => 20,
|
764 |
),
|
765 |
),
|
766 |
-
// Border Color
|
767 |
'border_color' => array(
|
768 |
-
'title' => __('Border color', 'kadence-woocommerce-email-designer'),
|
769 |
'section' => 'container',
|
770 |
'control_type' => 'color',
|
771 |
-
'default' => self::get_default_value('border_color'),
|
772 |
'live_method' => 'css',
|
773 |
'selectors' => array(
|
774 |
-
'body #template_container' => array('border-color'),
|
775 |
),
|
776 |
),
|
777 |
// Shadow
|
778 |
'shadow' => array(
|
779 |
-
'title' => __('Shadow', 'kadence-woocommerce-email-designer'),
|
780 |
'control_type' => 'rangevalue',
|
781 |
'section' => 'container',
|
782 |
-
'description' => __('Warning: most email clients do not yet support this', 'kadence-woocommerce-email-designer'),
|
783 |
-
'default' => self::get_default_value('shadow'),
|
784 |
'live_method' => 'css',
|
785 |
'selectors' => array(
|
786 |
-
'body #template_container' => array('box-shadow'),
|
787 |
),
|
788 |
'input_attrs' => array(
|
789 |
'step' => 1,
|
@@ -793,13 +1057,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
793 |
),
|
794 |
// Email Top Padding
|
795 |
'email_padding' => array(
|
796 |
-
'title' => __('Container Top Padding', 'kadence-woocommerce-email-designer'),
|
797 |
'control_type' => 'rangevalue',
|
798 |
'section' => 'container',
|
799 |
-
'default' => self::get_default_value('email_padding'),
|
800 |
'live_method' => 'css',
|
801 |
'selectors' => array(
|
802 |
-
'#wrapper' => array('padding-top'),
|
803 |
),
|
804 |
'input_attrs' => array(
|
805 |
'step' => 1,
|
@@ -809,13 +1073,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
809 |
),
|
810 |
// Email Top Padding
|
811 |
'email_padding_bottom' => array(
|
812 |
-
'title' => __('Container Botom Padding', 'kadence-woocommerce-email-designer'),
|
813 |
'control_type' => 'rangevalue',
|
814 |
'section' => 'container',
|
815 |
-
'default' => self::get_default_value('email_padding'),
|
816 |
'live_method' => 'css',
|
817 |
'selectors' => array(
|
818 |
-
'#wrapper' => array('padding-bottom'),
|
819 |
),
|
820 |
'input_attrs' => array(
|
821 |
'step' => 1,
|
@@ -823,28 +1087,42 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
823 |
'max' => 250,
|
824 |
),
|
825 |
),
|
826 |
-
|
827 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
828 |
'header_image_align' => array(
|
829 |
-
'title' => __('Image Align', 'kadence-woocommerce-email-designer'),
|
830 |
'section' => 'header_image',
|
831 |
-
'default' => self::get_default_value('header_image_align'),
|
832 |
'live_method' => 'css',
|
833 |
'type' => 'select',
|
834 |
'choices' => self::get_image_aligns(),
|
835 |
'selectors' => array(
|
836 |
-
'#template_header_image_table td' => array('text-align'),
|
837 |
),
|
838 |
),
|
839 |
// Image Maxwidth
|
840 |
'header_image_maxwidth' => array(
|
841 |
-
'title' => __('Image Max Width', 'kadence-woocommerce-email-designer'),
|
842 |
'section' => 'header_image',
|
843 |
-
'default' => self::get_default_value('header_image_maxwidth'),
|
844 |
'live_method' => 'css',
|
845 |
'control_type' => 'rangevalue',
|
846 |
'selectors' => array(
|
847 |
-
'#template_header_image img' => array('max-width'),
|
848 |
),
|
849 |
'input_attrs' => array(
|
850 |
'step' => 1,
|
@@ -853,24 +1131,24 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
853 |
),
|
854 |
),
|
855 |
'header_image_background_color' => array(
|
856 |
-
'title' => __('Background color', 'kadence-woocommerce-email-designer'),
|
857 |
'section' => 'header_image',
|
858 |
'control_type' => 'color',
|
859 |
-
'default' => self::get_default_value('header_image_background_color'),
|
860 |
'live_method' => 'css',
|
861 |
'selectors' => array(
|
862 |
-
'#template_header_image_container' => array('background-color'),
|
863 |
),
|
864 |
),
|
865 |
-
// Header Padding top/bottom
|
866 |
'header_image_padding_top_bottom' => array(
|
867 |
-
'title' => __('Padding top/bottom', 'kadence-woocommerce-email-designer'),
|
868 |
'control_type' => 'rangevalue',
|
869 |
'section' => 'header_image',
|
870 |
-
'default' => self::get_default_value('header_image_padding_top_bottom'),
|
871 |
'live_method' => 'css',
|
872 |
'selectors' => array(
|
873 |
-
'#template_header_image_table td' => array('padding-top', 'padding-bottom'),
|
874 |
),
|
875 |
'input_attrs' => array(
|
876 |
'step' => 1,
|
@@ -878,40 +1156,40 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
878 |
'max' => 150,
|
879 |
),
|
880 |
),
|
881 |
-
// Header background color
|
882 |
'header_background_color' => array(
|
883 |
-
'title' => __('Background color', 'kadence-woocommerce-email-designer'),
|
884 |
'section' => 'header_style',
|
885 |
'control_type' => 'color',
|
886 |
-
'default' => self::get_default_value('header_background_color'),
|
887 |
'live_method' => 'css',
|
888 |
'selectors' => array(
|
889 |
-
'#template_header' => array('background-color'),
|
890 |
),
|
891 |
),
|
892 |
// Header Text align
|
893 |
'header_text_align' => array(
|
894 |
-
'title' => __('Text align', 'kadence-woocommerce-email-designer'),
|
895 |
'section' => 'header_style',
|
896 |
-
'default' => self::get_default_value('header_text_align'),
|
897 |
'live_method' => 'css',
|
898 |
'type' => 'select',
|
899 |
'choices' => self::get_text_aligns(),
|
900 |
'selectors' => array(
|
901 |
-
'#header_wrapper h1' => array('text-align'),
|
902 |
-
'#header_wrapper' => array('text-align'),
|
903 |
),
|
904 |
),
|
905 |
|
906 |
-
// Header Padding top/bottom
|
907 |
'header_padding_top' => array(
|
908 |
-
'title' => __('Padding Top', 'kadence-woocommerce-email-designer'),
|
909 |
'control_type' => 'rangevalue',
|
910 |
'section' => 'header_style',
|
911 |
-
'default' => self::get_default_value('header_padding_top_bottom'),
|
912 |
'live_method' => 'css',
|
913 |
'selectors' => array(
|
914 |
-
'#header_wrapper' => array('padding-top'),
|
915 |
),
|
916 |
'input_attrs' => array(
|
917 |
'step' => 1,
|
@@ -921,13 +1199,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
921 |
),
|
922 |
// Header Padding top/bottom
|
923 |
'header_padding_bottom' => array(
|
924 |
-
'title' => __('Padding Bottom', 'kadence-woocommerce-email-designer'),
|
925 |
'control_type' => 'rangevalue',
|
926 |
'section' => 'header_style',
|
927 |
-
'default' => self::get_default_value('header_padding_top_bottom'),
|
928 |
'live_method' => 'css',
|
929 |
'selectors' => array(
|
930 |
-
'#header_wrapper' => array('padding-bottom'),
|
931 |
),
|
932 |
'input_attrs' => array(
|
933 |
'step' => 1,
|
@@ -938,13 +1216,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
938 |
|
939 |
// Header Padding left/right
|
940 |
'header_padding_left_right' => array(
|
941 |
-
'title' => __('Padding left/right', 'kadence-woocommerce-email-designer'),
|
942 |
'control_type' => 'rangevalue',
|
943 |
'section' => 'header_style',
|
944 |
-
'default' => self::get_default_value('header_padding_left_right'),
|
945 |
'live_method' => 'css',
|
946 |
'selectors' => array(
|
947 |
-
'#header_wrapper' => array('padding-left', 'padding-right'),
|
948 |
),
|
949 |
'input_attrs' => array(
|
950 |
'step' => 1,
|
@@ -954,13 +1232,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
954 |
),
|
955 |
// Heading Font size
|
956 |
'heading_font_size' => array(
|
957 |
-
'title' => __('Heading Font size', 'kadence-woocommerce-email-designer'),
|
958 |
'control_type' => 'rangevalue',
|
959 |
'section' => 'heading',
|
960 |
-
'default' => self::get_default_value('heading_font_size'),
|
961 |
'live_method' => 'css',
|
962 |
'selectors' => array(
|
963 |
-
'#template_header h1' => array('font-size'),
|
964 |
),
|
965 |
'input_attrs' => array(
|
966 |
'step' => 1,
|
@@ -970,13 +1248,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
970 |
),
|
971 |
// heading Line Height
|
972 |
'heading_line_height' => array(
|
973 |
-
'title' => __('Heading Line Height', 'kadence-woocommerce-email-designer'),
|
974 |
'control_type' => 'rangevalue',
|
975 |
'section' => 'heading',
|
976 |
-
'default' => self::get_default_value('heading_line_height'),
|
977 |
'live_method' => 'css',
|
978 |
'selectors' => array(
|
979 |
-
'#template_header h1' => array('line-height'),
|
980 |
),
|
981 |
'input_attrs' => array(
|
982 |
'step' => 1,
|
@@ -986,40 +1264,40 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
986 |
),
|
987 |
// Heading Font family
|
988 |
'heading_font_family' => array(
|
989 |
-
'title' => __('Heading Font family', 'kadence-woocommerce-email-designer'),
|
990 |
'section' => 'heading',
|
991 |
-
'default' => self::get_default_value('heading_font_family'),
|
992 |
'live_method' => 'css',
|
993 |
'type' => 'select',
|
994 |
'choices' => self::get_font_families(),
|
995 |
'selectors' => array(
|
996 |
-
'#template_header h1' => array('font-family'),
|
997 |
),
|
998 |
),
|
999 |
// Heading Font style
|
1000 |
'heading_font_style' => array(
|
1001 |
-
'title' => __('Heading Font Style', 'kadence-woocommerce-email-designer'),
|
1002 |
'section' => 'heading',
|
1003 |
-
'default' => self::get_default_value('heading_font_style'),
|
1004 |
'live_method' => 'css',
|
1005 |
'type' => 'select',
|
1006 |
'choices' => array(
|
1007 |
-
'normal' => __('Normal', 'kadence-woocommerce-email-designer'),
|
1008 |
-
'italic' => __('Italic', 'kadence-woocommerce-email-designer'),
|
1009 |
),
|
1010 |
'selectors' => array(
|
1011 |
-
'#template_header h1' => array('font-style'),
|
1012 |
),
|
1013 |
),
|
1014 |
// Heading Font weight
|
1015 |
'heading_font_weight' => array(
|
1016 |
-
'title' => __('Heading Font weight', 'kadence-woocommerce-email-designer'),
|
1017 |
'control_type' => 'rangevalue',
|
1018 |
'section' => 'heading',
|
1019 |
-
'default' => self::get_default_value('heading_font_weight'),
|
1020 |
'live_method' => 'css',
|
1021 |
'selectors' => array(
|
1022 |
-
'#template_header h1' => array('font-weight'),
|
1023 |
),
|
1024 |
'input_attrs' => array(
|
1025 |
'step' => 100,
|
@@ -1029,45 +1307,45 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1029 |
),
|
1030 |
// Heading Color
|
1031 |
'heading_color' => array(
|
1032 |
-
'title' => __('Heading Text color', 'kadence-woocommerce-email-designer'),
|
1033 |
'section' => 'heading',
|
1034 |
'control_type' => 'color',
|
1035 |
-
'default' => self::get_default_value('heading_color'),
|
1036 |
'live_method' => 'css',
|
1037 |
'selectors' => array(
|
1038 |
-
'#template_header' => array('color'),
|
1039 |
-
'#template_header h1' => array('color'),
|
1040 |
),
|
1041 |
),
|
1042 |
//Subtitle Info
|
1043 |
'subtitle_fontt_info' => array(
|
1044 |
-
'title' => __('Subtitle Settings', 'kadence-woocommerce-email-designer'),
|
1045 |
'section' => 'heading',
|
1046 |
'control_type' => 'kwdinfoblock',
|
1047 |
'description' => '',
|
1048 |
),
|
1049 |
// Subtitle placement
|
1050 |
'subtitle_placement' => array(
|
1051 |
-
'title' => __('Subtitle Placement', 'kadence-woocommerce-email-designer'),
|
1052 |
'section' => 'heading',
|
1053 |
-
'default' => self::get_default_value('subtitle_placement'),
|
1054 |
'transport' => 'refresh',
|
1055 |
'type' => 'select',
|
1056 |
'choices' => array(
|
1057 |
-
'below' => __('Below Heading', 'kadence-woocommerce-email-designer'),
|
1058 |
-
'above' => __('Above Heading', 'kadence-woocommerce-email-designer'),
|
1059 |
),
|
1060 |
),
|
1061 |
|
1062 |
// Subtitle Font size
|
1063 |
'subtitle_font_size' => array(
|
1064 |
-
'title' => __('Subtitle Font Size', 'kadence-woocommerce-email-designer'),
|
1065 |
'control_type' => 'rangevalue',
|
1066 |
'section' => 'heading',
|
1067 |
-
'default' => self::get_default_value('subtitle_font_size'),
|
1068 |
'live_method' => 'css',
|
1069 |
'selectors' => array(
|
1070 |
-
'#template_header .subtitle' => array('font-size'),
|
1071 |
),
|
1072 |
'input_attrs' => array(
|
1073 |
'step' => 1,
|
@@ -1077,13 +1355,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1077 |
),
|
1078 |
// Subtitle Line Height
|
1079 |
'subtitle_line_height' => array(
|
1080 |
-
'title' => __('Subtitle Line Height', 'kadence-woocommerce-email-designer'),
|
1081 |
'control_type' => 'rangevalue',
|
1082 |
'section' => 'heading',
|
1083 |
-
'default' => self::get_default_value('subtitle_line_height'),
|
1084 |
'live_method' => 'css',
|
1085 |
'selectors' => array(
|
1086 |
-
'#template_header .subtitle' => array('line-height'),
|
1087 |
),
|
1088 |
'input_attrs' => array(
|
1089 |
'step' => 1,
|
@@ -1091,43 +1369,43 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1091 |
'max' => 125,
|
1092 |
),
|
1093 |
),
|
1094 |
-
// Subtitle Font family
|
1095 |
'subtitle_font_family' => array(
|
1096 |
-
'title' => __('Subtitle Font Family', 'kadence-woocommerce-email-designer'),
|
1097 |
'section' => 'heading',
|
1098 |
-
'default' => self::get_default_value('subtitle_font_family'),
|
1099 |
'live_method' => 'css',
|
1100 |
'type' => 'select',
|
1101 |
'choices' => self::get_font_families(),
|
1102 |
'selectors' => array(
|
1103 |
-
'#template_header .subtitle' => array('font-family'),
|
1104 |
),
|
1105 |
),
|
1106 |
// Subtitle Font style
|
1107 |
'subtitle_font_style' => array(
|
1108 |
-
'title' => __('Subtitle Font Style', 'kadence-woocommerce-email-designer'),
|
1109 |
'section' => 'heading',
|
1110 |
-
'default' => self::get_default_value('subtitle_font_style'),
|
1111 |
'live_method' => 'css',
|
1112 |
'type' => 'select',
|
1113 |
'choices' => array(
|
1114 |
-
'normal' => __('Normal', 'kadence-woocommerce-email-designer'),
|
1115 |
-
'italic' => __('Italic', 'kadence-woocommerce-email-designer'),
|
1116 |
),
|
1117 |
'selectors' => array(
|
1118 |
-
'#template_header .subtitle' => array('font-style'),
|
1119 |
),
|
1120 |
),
|
1121 |
|
1122 |
// Subtitle Font weight
|
1123 |
'subtitle_font_weight' => array(
|
1124 |
-
'title' => __('Subtitle Font weight', 'kadence-woocommerce-email-designer'),
|
1125 |
'control_type' => 'rangevalue',
|
1126 |
'section' => 'heading',
|
1127 |
-
'default' => self::get_default_value('subtitle_font_weight'),
|
1128 |
'live_method' => 'css',
|
1129 |
'selectors' => array(
|
1130 |
-
'#template_header .subtitle' => array('font-weight'),
|
1131 |
),
|
1132 |
'input_attrs' => array(
|
1133 |
'step' => 100,
|
@@ -1138,25 +1416,25 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1138 |
|
1139 |
// Subtitle Color
|
1140 |
'subtitle_color' => array(
|
1141 |
-
'title' => __('Subtitle Text color', 'kadence-woocommerce-email-designer'),
|
1142 |
'section' => 'heading',
|
1143 |
'control_type' => 'color',
|
1144 |
-
'default' => self::get_default_value('subtitle_color'),
|
1145 |
'live_method' => 'css',
|
1146 |
'selectors' => array(
|
1147 |
-
'#template_header .subtitle' => array('color'),
|
1148 |
),
|
1149 |
),
|
1150 |
|
1151 |
// Content padding top
|
1152 |
'content_padding_top' => array(
|
1153 |
-
'title' => __('Padding Top', 'kadence-woocommerce-email-designer'),
|
1154 |
'control_type' => 'rangevalue',
|
1155 |
'section' => 'content_container',
|
1156 |
-
'default' => self::get_default_value('content_padding'),
|
1157 |
'live_method' => 'css',
|
1158 |
'selectors' => array(
|
1159 |
-
'#body_content' => array('padding-top'),
|
1160 |
),
|
1161 |
'input_attrs' => array(
|
1162 |
'step' => 1,
|
@@ -1166,13 +1444,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1166 |
),
|
1167 |
// Content padding
|
1168 |
'content_padding_bottom' => array(
|
1169 |
-
'title' => __('Padding Bottom', 'kadence-woocommerce-email-designer'),
|
1170 |
'control_type' => 'rangevalue',
|
1171 |
'section' => 'content_container',
|
1172 |
-
'default' => self::get_default_value('content_padding_bottom'),
|
1173 |
'live_method' => 'css',
|
1174 |
'selectors' => array(
|
1175 |
-
'#body_content' => array('padding-bottom'),
|
1176 |
),
|
1177 |
'input_attrs' => array(
|
1178 |
'step' => 1,
|
@@ -1182,14 +1460,14 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1182 |
),
|
1183 |
// Content padding
|
1184 |
'content_padding' => array(
|
1185 |
-
'title' => __('Padding Left/Right', 'kadence-woocommerce-email-designer'),
|
1186 |
'control_type' => 'rangevalue',
|
1187 |
'section' => 'content_container',
|
1188 |
-
'default' => self::get_default_value('content_padding'),
|
1189 |
'live_method' => 'css',
|
1190 |
'selectors' => array(
|
1191 |
-
'#body_content > table > tbody > tr > td' => array('padding-left', 'padding-right'),
|
1192 |
-
'#body_content > table > tr > td' => array('padding-left', 'padding-right'),
|
1193 |
),
|
1194 |
'input_attrs' => array(
|
1195 |
'step' => 1,
|
@@ -1200,14 +1478,14 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1200 |
// TEXT STYLE
|
1201 |
// Font size
|
1202 |
'font_size' => array(
|
1203 |
-
'title' => __('Font Size', 'kadence-woocommerce-email-designer'),
|
1204 |
'control_type' => 'rangevalue',
|
1205 |
'section' => 'text_style',
|
1206 |
-
'default' => self::get_default_value('font_size'),
|
1207 |
'live_method' => 'css',
|
1208 |
'selectors' => array(
|
1209 |
-
'#body_content_inner' => array('font-size'),
|
1210 |
-
'img' => array('font-size'),
|
1211 |
),
|
1212 |
'input_attrs' => array(
|
1213 |
'step' => 1,
|
@@ -1217,14 +1495,14 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1217 |
),
|
1218 |
// Line Height
|
1219 |
'line_height' => array(
|
1220 |
-
'title' => __('Line Height', 'kadence-woocommerce-email-designer'),
|
1221 |
'control_type' => 'rangevalue',
|
1222 |
'section' => 'text_style',
|
1223 |
-
'default' => self::get_default_value('line_height'),
|
1224 |
'live_method' => 'css',
|
1225 |
'selectors' => array(
|
1226 |
-
'#body_content_inner' => array('line-height'),
|
1227 |
-
'img' => array('line-height'),
|
1228 |
),
|
1229 |
'input_attrs' => array(
|
1230 |
'step' => 1,
|
@@ -1234,9 +1512,9 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1234 |
),
|
1235 |
// Font family
|
1236 |
'font_family' => array(
|
1237 |
-
'title' => __('Font Family', 'kadence-woocommerce-email-designer'),
|
1238 |
'section' => 'text_style',
|
1239 |
-
'default' => self::get_default_value('font_family'),
|
1240 |
'live_method' => 'css',
|
1241 |
'type' => 'select',
|
1242 |
'choices' => self::get_font_families(),
|
@@ -1248,13 +1526,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1248 |
),
|
1249 |
// Font weight
|
1250 |
'font_weight' => array(
|
1251 |
-
'title' => __('Font weight', 'kadence-woocommerce-email-designer'),
|
1252 |
'control_type' => 'rangevalue',
|
1253 |
'section' => 'text_style',
|
1254 |
-
'default' => self::get_default_value('font_weight'),
|
1255 |
'live_method' => 'css',
|
1256 |
'selectors' => array(
|
1257 |
-
'#body_content_inner' => array('font-weight'),
|
1258 |
),
|
1259 |
'input_attrs' => array(
|
1260 |
'step' => 100,
|
@@ -1264,27 +1542,27 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1264 |
),
|
1265 |
// Link color
|
1266 |
'link_color' => array(
|
1267 |
-
'title' => __('Link Color', 'kadence-woocommerce-email-designer'),
|
1268 |
'section' => 'text_style',
|
1269 |
'control_type' => 'color',
|
1270 |
-
'default' => self::get_default_value('link_color'),
|
1271 |
'live_method' => 'css',
|
1272 |
'selectors' => array(
|
1273 |
-
'a' => array('color'),
|
1274 |
-
'.link' => array('color'),
|
1275 |
-
'.btn' => array('background-color'),
|
1276 |
),
|
1277 |
),
|
1278 |
// H2 TEXT STYLE
|
1279 |
// Font size
|
1280 |
'h2_font_size' => array(
|
1281 |
-
'title' => __('H2 Font Size', 'kadence-woocommerce-email-designer'),
|
1282 |
'control_type' => 'rangevalue',
|
1283 |
'section' => 'headings_style',
|
1284 |
-
'default' => self::get_default_value('h2_font_size'),
|
1285 |
'live_method' => 'css',
|
1286 |
'selectors' => array(
|
1287 |
-
'#template_body h2' => array('font-size'),
|
1288 |
),
|
1289 |
'input_attrs' => array(
|
1290 |
'step' => 1,
|
@@ -1294,13 +1572,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1294 |
),
|
1295 |
// h2 Line Height
|
1296 |
'h2_line_height' => array(
|
1297 |
-
'title' => __('H2 Line Height', 'kadence-woocommerce-email-designer'),
|
1298 |
'control_type' => 'rangevalue',
|
1299 |
'section' => 'headings_style',
|
1300 |
-
'default' => self::get_default_value('h2_line_height'),
|
1301 |
'live_method' => 'css',
|
1302 |
'selectors' => array(
|
1303 |
-
'#template_body h2' => array('line-height'),
|
1304 |
),
|
1305 |
'input_attrs' => array(
|
1306 |
'step' => 1,
|
@@ -1310,13 +1588,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1310 |
),
|
1311 |
// h2 padding top
|
1312 |
'h2_padding_top' => array(
|
1313 |
-
'title' => __('H2 Padding Top', 'kadence-woocommerce-email-designer'),
|
1314 |
'control_type' => 'rangevalue',
|
1315 |
'section' => 'headings_style',
|
1316 |
-
'default' => self::get_default_value('h2_padding_top'),
|
1317 |
'live_method' => 'css',
|
1318 |
'selectors' => array(
|
1319 |
-
'#template_body h2' => array('padding-top'),
|
1320 |
),
|
1321 |
'input_attrs' => array(
|
1322 |
'step' => 1,
|
@@ -1326,13 +1604,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1326 |
),
|
1327 |
// h2 padding bottom
|
1328 |
'h2_padding_bottom' => array(
|
1329 |
-
'title' => __('H2 Padding Bottom', 'kadence-woocommerce-email-designer'),
|
1330 |
'control_type' => 'rangevalue',
|
1331 |
'section' => 'headings_style',
|
1332 |
-
'default' => self::get_default_value('h2_padding_bottom'),
|
1333 |
'live_method' => 'css',
|
1334 |
'selectors' => array(
|
1335 |
-
'#template_body h2' => array('padding-bottom'),
|
1336 |
),
|
1337 |
'input_attrs' => array(
|
1338 |
'step' => 1,
|
@@ -1342,13 +1620,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1342 |
),
|
1343 |
// h2 margin top
|
1344 |
'h2_margin_top' => array(
|
1345 |
-
'title' => __('H2 Margin Top', 'kadence-woocommerce-email-designer'),
|
1346 |
'control_type' => 'rangevalue',
|
1347 |
'section' => 'headings_style',
|
1348 |
-
'default' => self::get_default_value('h2_margin_top'),
|
1349 |
'live_method' => 'css',
|
1350 |
'selectors' => array(
|
1351 |
-
'#template_body h2' => array('margin-top'),
|
1352 |
),
|
1353 |
'input_attrs' => array(
|
1354 |
'step' => 1,
|
@@ -1358,13 +1636,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1358 |
),
|
1359 |
// h2 margin bottom
|
1360 |
'h2_margin_bottom' => array(
|
1361 |
-
'title' => __('H2 Margin Bottom', 'kadence-woocommerce-email-designer'),
|
1362 |
'control_type' => 'rangevalue',
|
1363 |
'section' => 'headings_style',
|
1364 |
-
'default' => self::get_default_value('h2_margin_bottom'),
|
1365 |
'live_method' => 'css',
|
1366 |
'selectors' => array(
|
1367 |
-
'#template_body h2' => array('margin-bottom'),
|
1368 |
),
|
1369 |
'input_attrs' => array(
|
1370 |
'step' => 1,
|
@@ -1374,43 +1652,43 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1374 |
),
|
1375 |
// h2 Font family
|
1376 |
'h2_font_family' => array(
|
1377 |
-
'title' => __('H2 Font Family', 'kadence-woocommerce-email-designer'),
|
1378 |
'section' => 'headings_style',
|
1379 |
-
'default' => self::get_default_value('h2_font_family'),
|
1380 |
'live_method' => 'css',
|
1381 |
'type' => 'select',
|
1382 |
'choices' => self::get_font_families(),
|
1383 |
'selectors' => array(
|
1384 |
-
'#template_body h2' => array('font-family'),
|
1385 |
-
'#template_body h2 a' => array('font-family'),
|
1386 |
),
|
1387 |
),
|
1388 |
// h2 Font style
|
1389 |
'h2_font_style' => array(
|
1390 |
-
'title' => __('H2 Font Style', 'kadence-woocommerce-email-designer'),
|
1391 |
'section' => 'headings_style',
|
1392 |
-
'default' => self::get_default_value('h2_font_style'),
|
1393 |
'live_method' => 'css',
|
1394 |
'type' => 'select',
|
1395 |
'choices' => array(
|
1396 |
-
'normal' => __('Normal', 'kadence-woocommerce-email-designer'),
|
1397 |
-
'italic' => __('Italic', 'kadence-woocommerce-email-designer'),
|
1398 |
),
|
1399 |
'selectors' => array(
|
1400 |
-
'#template_body h2' => array('font-style'),
|
1401 |
-
'#template_body h2 a' => array('font-style'),
|
1402 |
),
|
1403 |
),
|
1404 |
// h2 Font weight
|
1405 |
'h2_font_weight' => array(
|
1406 |
-
'title' => __('H2 Font weight', 'kadence-woocommerce-email-designer'),
|
1407 |
'control_type' => 'rangevalue',
|
1408 |
'section' => 'headings_style',
|
1409 |
-
'default' => self::get_default_value('h2_font_weight'),
|
1410 |
'live_method' => 'css',
|
1411 |
'selectors' => array(
|
1412 |
-
'#template_body h2' => array('font-weight'),
|
1413 |
-
'#template_body h2 a' => array('font-weight'),
|
1414 |
),
|
1415 |
'input_attrs' => array(
|
1416 |
'step' => 100,
|
@@ -1420,64 +1698,64 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1420 |
),
|
1421 |
// h2 text transform
|
1422 |
'h2_text_transform' => array(
|
1423 |
-
'title' => __('H2 Text Transform', 'kadence-woocommerce-email-designer'),
|
1424 |
'section' => 'headings_style',
|
1425 |
-
'default' => self::get_default_value('h2_text_transform'),
|
1426 |
'live_method' => 'css',
|
1427 |
'type' => 'select',
|
1428 |
'choices' => array(
|
1429 |
-
'none' => __('None', 'kadence-woocommerce-email-designer'),
|
1430 |
-
'uppercase' => __('Uppercase', 'kadence-woocommerce-email-designer'),
|
1431 |
-
'lowercase' => __('Lowercase', 'kadence-woocommerce-email-designer'),
|
1432 |
-
'capitalize' => __('Capitalize', 'kadence-woocommerce-email-designer'),
|
1433 |
),
|
1434 |
'selectors' => array(
|
1435 |
-
'#template_body h2' => array('text-transform'),
|
1436 |
),
|
1437 |
),
|
1438 |
// H2 color
|
1439 |
'h2_color' => array(
|
1440 |
-
'title' => __('H2 Color', 'kadence-woocommerce-email-designer'),
|
1441 |
'section' => 'headings_style',
|
1442 |
'control_type' => 'color',
|
1443 |
-
'default' => self::get_default_value('h2_color'),
|
1444 |
'live_method' => 'css',
|
1445 |
'selectors' => array(
|
1446 |
-
'#template_body h2' => array('color'),
|
1447 |
-
'#template_body h2 a' => array('color'),
|
1448 |
),
|
1449 |
),
|
1450 |
// h2 text align
|
1451 |
'h2_text_align' => array(
|
1452 |
-
'title' => __('H2 Text Align', 'kadence-woocommerce-email-designer'),
|
1453 |
'section' => 'headings_style',
|
1454 |
-
'default' => self::get_default_value('h2_text_align'),
|
1455 |
'live_method' => 'css',
|
1456 |
'type' => 'select',
|
1457 |
'choices' => self::get_text_aligns(),
|
1458 |
'selectors' => array(
|
1459 |
-
'#template_body h2' => array('text-align'),
|
1460 |
),
|
1461 |
),
|
1462 |
// h2 style
|
1463 |
'h2_style' => array(
|
1464 |
-
'title' => __('H2 Separator', 'kadence-woocommerce-email-designer'),
|
1465 |
'section' => 'headings_style',
|
1466 |
-
'default' => self::get_default_value('h2_style'),
|
1467 |
'transport' => 'refresh',
|
1468 |
'type' => 'select',
|
1469 |
'choices' => array(
|
1470 |
-
'none' => __('None', 'kadence-woocommerce-email-designer'),
|
1471 |
-
'below' => __('Separator below', 'kadence-woocommerce-email-designer'),
|
1472 |
-
'above' => __('Separator above', 'kadence-woocommerce-email-designer'),
|
1473 |
),
|
1474 |
),
|
1475 |
// separator height
|
1476 |
'h2_separator_height' => array(
|
1477 |
-
'title' => __('H2 Separator height', 'kadence-woocommerce-email-designer'),
|
1478 |
'section' => 'headings_style',
|
1479 |
'control_type' => 'rangevalue',
|
1480 |
-
'default' => self::get_default_value('h2_style'),
|
1481 |
'live_method' => 'css',
|
1482 |
'type' => 'select',
|
1483 |
'input_attrs' => array(
|
@@ -1486,59 +1764,59 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1486 |
'max' => 30,
|
1487 |
),
|
1488 |
'selectors' => array(
|
1489 |
-
'.title-style-below #template_body h2' => array('border-bottom-width'),
|
1490 |
-
'.title-style-above #template_body h2' => array('border-top-width'),
|
1491 |
),
|
1492 |
),
|
1493 |
// h2 style
|
1494 |
'h2_separator_style' => array(
|
1495 |
-
'title' => __('H2 Separator Style', 'kadence-woocommerce-email-designer'),
|
1496 |
'section' => 'headings_style',
|
1497 |
-
'default' => self::get_default_value('h2_style'),
|
1498 |
'live_method' => 'css',
|
1499 |
'type' => 'select',
|
1500 |
'choices' => array(
|
1501 |
-
'solid' => __('Solid', 'kadence-woocommerce-email-designer'),
|
1502 |
-
'double' => __('Double', 'kadence-woocommerce-email-designer'),
|
1503 |
-
'groove' => __('Groove', 'kadence-woocommerce-email-designer'),
|
1504 |
-
'dotted' => __('Dotted', 'kadence-woocommerce-email-designer'),
|
1505 |
-
'dashed' => __('Dashed', 'kadence-woocommerce-email-designer'),
|
1506 |
-
'ridge' => __('Ridge', 'kadence-woocommerce-email-designer'),
|
1507 |
),
|
1508 |
'selectors' => array(
|
1509 |
-
'.title-style-below #template_body h2' => array('border-bottom-style'),
|
1510 |
-
'.title-style-above #template_body h2' => array('border-top-style'),
|
1511 |
),
|
1512 |
),
|
1513 |
// separator color
|
1514 |
'h2_separator_color' => array(
|
1515 |
-
'title' => __('H2 Separator Color', 'kadence-woocommerce-email-designer'),
|
1516 |
'section' => 'headings_style',
|
1517 |
'control_type' => 'color',
|
1518 |
-
'default' => self::get_default_value('h2_separator_color'),
|
1519 |
'live_method' => 'css',
|
1520 |
'selectors' => array(
|
1521 |
-
'.title-style-below #template_body h2' => array('border-bottom-color'),
|
1522 |
-
'.title-style-above #template_body h2' => array('border-top-color'),
|
1523 |
),
|
1524 |
),
|
1525 |
// H3 TEXT STYLE
|
1526 |
//h3 Info
|
1527 |
'h3_font_info' => array(
|
1528 |
-
'title' => __('H3 Settings', 'kadence-woocommerce-email-designer'),
|
1529 |
'section' => 'headings_style',
|
1530 |
'control_type' => 'kwdinfoblock',
|
1531 |
'description' => '',
|
1532 |
),
|
1533 |
// Font size
|
1534 |
'h3_font_size' => array(
|
1535 |
-
'title' => __('H3 Font Size', 'kadence-woocommerce-email-designer'),
|
1536 |
'control_type' => 'rangevalue',
|
1537 |
'section' => 'headings_style',
|
1538 |
-
'default' => self::get_default_value('h3_font_size'),
|
1539 |
'live_method' => 'css',
|
1540 |
'selectors' => array(
|
1541 |
-
'#template_body h3' => array('font-size'),
|
1542 |
),
|
1543 |
'input_attrs' => array(
|
1544 |
'step' => 1,
|
@@ -1546,15 +1824,15 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1546 |
'max' => 30,
|
1547 |
),
|
1548 |
),
|
1549 |
-
// h3 Line Height
|
1550 |
'h3_line_height' => array(
|
1551 |
-
'title' => __('H3 Line Height', 'kadence-woocommerce-email-designer'),
|
1552 |
'control_type' => 'rangevalue',
|
1553 |
'section' => 'headings_style',
|
1554 |
-
'default' => self::get_default_value('h2_line_height'),
|
1555 |
'live_method' => 'css',
|
1556 |
'selectors' => array(
|
1557 |
-
'#template_body h3' => array('line-height'),
|
1558 |
),
|
1559 |
'input_attrs' => array(
|
1560 |
'step' => 1,
|
@@ -1562,42 +1840,42 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1562 |
'max' => 90,
|
1563 |
),
|
1564 |
),
|
1565 |
-
// h3 Font family
|
1566 |
'h3_font_family' => array(
|
1567 |
-
'title' => __('H3 Font Family', 'kadence-woocommerce-email-designer'),
|
1568 |
'section' => 'headings_style',
|
1569 |
-
'default' => self::get_default_value('h2_font_family'),
|
1570 |
'live_method' => 'css',
|
1571 |
'type' => 'select',
|
1572 |
'choices' => self::get_font_families(),
|
1573 |
'selectors' => array(
|
1574 |
-
'#template_body h3' => array('font-family'),
|
1575 |
),
|
1576 |
),
|
1577 |
-
// h3 Font style
|
1578 |
'h3_font_style' => array(
|
1579 |
-
'title' => __('H3 Font Style', 'kadence-woocommerce-email-designer'),
|
1580 |
'section' => 'headings_style',
|
1581 |
-
'default' => self::get_default_value('h3_font_style'),
|
1582 |
'live_method' => 'css',
|
1583 |
'type' => 'select',
|
1584 |
'choices' => array(
|
1585 |
-
'normal' => __('Normal', 'kadence-woocommerce-email-designer'),
|
1586 |
-
'italic' => __('Italic', 'kadence-woocommerce-email-designer'),
|
1587 |
),
|
1588 |
'selectors' => array(
|
1589 |
-
'#template_body h3' => array('font-style'),
|
1590 |
),
|
1591 |
),
|
1592 |
-
// h3 Font weight
|
1593 |
'h3_font_weight' => array(
|
1594 |
-
'title' => __('H3 Font weight', 'kadence-woocommerce-email-designer'),
|
1595 |
'control_type' => 'rangevalue',
|
1596 |
'section' => 'headings_style',
|
1597 |
-
'default' => self::get_default_value('h3_font_weight'),
|
1598 |
'live_method' => 'css',
|
1599 |
'selectors' => array(
|
1600 |
-
'#template_body h3' => array('font-weight'),
|
1601 |
),
|
1602 |
'input_attrs' => array(
|
1603 |
'step' => 100,
|
@@ -1605,65 +1883,95 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1605 |
'max' => 900,
|
1606 |
),
|
1607 |
),
|
1608 |
-
// H3 color
|
1609 |
'h3_color' => array(
|
1610 |
-
'title' => __('H3 Color', 'kadence-woocommerce-email-designer'),
|
1611 |
'section' => 'headings_style',
|
1612 |
'control_type' => 'color',
|
1613 |
-
'default' => self::get_default_value('h3_color'),
|
1614 |
'live_method' => 'css',
|
1615 |
'selectors' => array(
|
1616 |
-
'#template_body h3' => array('color'),
|
1617 |
),
|
1618 |
),
|
1619 |
-
// Order ITEMS
|
1620 |
'order_items_style' => array(
|
1621 |
-
'title' => __('Order Table Style', 'kadence-woocommerce-email-designer'),
|
1622 |
'section' => 'items_table',
|
1623 |
-
'default' => self::get_default_value('order_items_style'),
|
1624 |
'transport' => 'refresh',
|
1625 |
'type' => 'select',
|
1626 |
'choices' => array(
|
1627 |
-
'normal' => __('Normal', 'kadence-woocommerce-email-designer'),
|
1628 |
-
'light' => __('Light', 'kadence-woocommerce-email-designer'),
|
1629 |
),
|
1630 |
),
|
1631 |
-
// Order ITEMS Image
|
1632 |
'order_items_image' => array(
|
1633 |
-
'title' => __('Product Image Option', 'kadence-woocommerce-email-designer'),
|
1634 |
'section' => 'items_table',
|
1635 |
'default' => self::get_default_value( 'order_items_image' ),
|
1636 |
'transport' => 'refresh',
|
1637 |
'type' => 'select',
|
1638 |
'choices' => array(
|
1639 |
-
'normal' => __('Do not show', 'kadence-woocommerce-email-designer'),
|
1640 |
-
'show' => __('Show', 'kadence-woocommerce-email-designer'),
|
1641 |
),
|
1642 |
),
|
1643 |
-
// Items table Background color
|
1644 |
'items_table_background_color' => array(
|
1645 |
-
'title' => __('Order Table Background color', 'kadence-woocommerce-email-designer'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1646 |
'section' => 'items_table',
|
1647 |
'control_type' => 'color',
|
1648 |
-
'default' => self::get_default_value('
|
1649 |
'live_method' => 'css',
|
1650 |
'selectors' => array(
|
1651 |
-
'#body_content_inner table.td' => array('background-color'),
|
|
|
|
|
1652 |
),
|
1653 |
),
|
1654 |
|
1655 |
-
// Items table Padding
|
1656 |
'items_table_padding' => array(
|
1657 |
-
'title' => __('Padding', 'kadence-woocommerce-email-designer'),
|
1658 |
'control_type' => 'rangevalue',
|
1659 |
'section' => 'items_table',
|
1660 |
-
'default' => self::get_default_value('items_table_padding'),
|
1661 |
'live_method' => 'css',
|
1662 |
'selectors' => array(
|
1663 |
-
'.order-items-normal #body_content_inner table.td th' => array('padding'),
|
1664 |
-
'.order-items-normal #body_content_inner table.td td' => array('padding'),
|
1665 |
-
'.order-items-light #body_content_inner table.td th' => array('padding-top', 'padding-bottom'),
|
1666 |
-
'.order-items-light #body_content_inner table.td td' => array('padding-top', 'padding-bottom'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1667 |
),
|
1668 |
'input_attrs' => array(
|
1669 |
'step' => 1,
|
@@ -1674,15 +1982,15 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1674 |
|
1675 |
// Items table Border width
|
1676 |
'items_table_border_width' => array(
|
1677 |
-
'title' => __('Border Width', 'kadence-woocommerce-email-designer'),
|
1678 |
'control_type' => 'rangevalue',
|
1679 |
'section' => 'items_table',
|
1680 |
-
'default' => self::get_default_value('items_table_border_width'),
|
1681 |
'live_method' => 'css',
|
1682 |
'selectors' => array(
|
1683 |
-
'.order-items-normal #body_content_inner .td' => array('border-width'),
|
1684 |
-
'.order-items-light #body_content_inner table.td .td' => array('border-bottom-width'),
|
1685 |
-
'.order-items-light #body_content_inner table.td' => array('border-top-width'),
|
1686 |
),
|
1687 |
'input_attrs' => array(
|
1688 |
'step' => 1,
|
@@ -1693,68 +2001,96 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1693 |
|
1694 |
// Items table Border color
|
1695 |
'items_table_border_color' => array(
|
1696 |
-
'title' => __('Border Color', 'kadence-woocommerce-email-designer'),
|
1697 |
'section' => 'items_table',
|
1698 |
'control_type' => 'color',
|
1699 |
-
'default' => self::get_default_value('items_table_border_color'),
|
1700 |
'live_method' => 'css',
|
1701 |
'selectors' => array(
|
1702 |
-
'#body_content_inner .td' => array('border-color'),
|
1703 |
),
|
1704 |
),
|
1705 |
// tems table border style
|
1706 |
'items_table_border_style' => array(
|
1707 |
-
'title' => __('Border Style', 'kadence-woocommerce-email-designer'),
|
1708 |
'section' => 'items_table',
|
1709 |
-
'default' => self::get_default_value('items_table_border_style'),
|
1710 |
'live_method' => 'css',
|
1711 |
'type' => 'select',
|
1712 |
'choices' => array(
|
1713 |
-
'solid' => __('Solid', 'kadence-woocommerce-email-designer'),
|
1714 |
-
'double' => __('Double', 'kadence-woocommerce-email-designer'),
|
1715 |
-
'groove' => __('Groove', 'kadence-woocommerce-email-designer'),
|
1716 |
-
'dotted' => __('Dotted', 'kadence-woocommerce-email-designer'),
|
1717 |
-
'dashed' => __('Dashed', 'kadence-woocommerce-email-designer'),
|
1718 |
-
'ridge' => __('Ridge', 'kadence-woocommerce-email-designer'),
|
1719 |
),
|
1720 |
'selectors' => array(
|
1721 |
-
'.order-items-normal #body_content_inner .td' => array('border-style'),
|
1722 |
-
'.order-items-light #body_content_inner table.td .td' => array('border-bottom-style'),
|
1723 |
-
'.order-items-light #body_content_inner table.td' => array('border-top-style'),
|
1724 |
),
|
1725 |
),
|
1726 |
// Order ITEMS
|
1727 |
'order_heading_style' => array(
|
1728 |
-
'title' => __('Order Table Heading Style', 'kadence-woocommerce-email-designer'),
|
1729 |
'section' => 'items_table',
|
1730 |
-
'default' => self::get_default_value('order_heading_style'),
|
1731 |
'transport' => 'refresh',
|
1732 |
'type' => 'select',
|
1733 |
'choices' => array(
|
1734 |
-
'normal' => __('Normal', 'kadence-woocommerce-email-designer'),
|
1735 |
-
'split' => __('Split', 'kadence-woocommerce-email-designer'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1736 |
),
|
1737 |
),
|
1738 |
//addresses Background color
|
1739 |
'addresses_background_color' => array(
|
1740 |
-
'title' => __('Address Box Background color', 'kadence-woocommerce-email-designer'),
|
1741 |
'section' => 'addresses',
|
1742 |
'control_type' => 'color',
|
1743 |
-
'default' => self::get_default_value('addresses_background_color'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1744 |
'live_method' => 'css',
|
1745 |
'selectors' => array(
|
1746 |
-
'#body_content_inner address'
|
|
|
|
|
|
|
|
|
|
|
1747 |
),
|
1748 |
),
|
1749 |
// addresses Border width
|
1750 |
'addresses_border_width' => array(
|
1751 |
-
'title' => __('Address Box Border Width', 'kadence-woocommerce-email-designer'),
|
1752 |
'control_type' => 'rangevalue',
|
1753 |
'section' => 'addresses',
|
1754 |
-
'default' => self::get_default_value('addresses_border_width'),
|
1755 |
'live_method' => 'css',
|
1756 |
'selectors' => array(
|
1757 |
-
'#body_content_inner address' => array('border-width'),
|
1758 |
),
|
1759 |
'input_attrs' => array(
|
1760 |
'step' => 1,
|
@@ -1764,89 +2100,89 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1764 |
),
|
1765 |
// addresses Border color
|
1766 |
'addresses_border_color' => array(
|
1767 |
-
'title' => __('Address Box Border Color', 'kadence-woocommerce-email-designer'),
|
1768 |
'section' => 'addresses',
|
1769 |
'control_type' => 'color',
|
1770 |
-
'default' => self::get_default_value('addresses_border_color'),
|
1771 |
'live_method' => 'css',
|
1772 |
'selectors' => array(
|
1773 |
-
'#body_content_inner address' => array('border-color'),
|
1774 |
),
|
1775 |
),
|
1776 |
// h2 style
|
1777 |
'addresses_border_style' => array(
|
1778 |
-
'title' => __('Address Box Border Style', 'kadence-woocommerce-email-designer'),
|
1779 |
'section' => 'addresses',
|
1780 |
-
'default' => self::get_default_value('addresses_border_style'),
|
1781 |
'live_method' => 'css',
|
1782 |
'type' => 'select',
|
1783 |
'choices' => array(
|
1784 |
-
'solid' => __('Solid', 'kadence-woocommerce-email-designer'),
|
1785 |
-
'double' => __('Double', 'kadence-woocommerce-email-designer'),
|
1786 |
-
'groove' => __('Groove', 'kadence-woocommerce-email-designer'),
|
1787 |
-
'dotted' => __('Dotted', 'kadence-woocommerce-email-designer'),
|
1788 |
-
'dashed' => __('Dashed', 'kadence-woocommerce-email-designer'),
|
1789 |
-
'ridge' => __('Ridge', 'kadence-woocommerce-email-designer'),
|
1790 |
),
|
1791 |
'selectors' => array(
|
1792 |
-
'#body_content_inner address' => array('border-style'),
|
1793 |
),
|
1794 |
),
|
1795 |
// addresses color
|
1796 |
'addresses_text_color' => array(
|
1797 |
-
'title' => __('Address Box Text Color', 'kadence-woocommerce-email-designer'),
|
1798 |
'section' => 'addresses',
|
1799 |
'control_type' => 'color',
|
1800 |
-
'default' => self::get_default_value('addresses_text_color'),
|
1801 |
'live_method' => 'css',
|
1802 |
'selectors' => array(
|
1803 |
-
'#body_content_inner address' => array('color'),
|
1804 |
),
|
1805 |
),
|
1806 |
// addresses text align
|
1807 |
'addresses_text_align' => array(
|
1808 |
-
'title' => __('Address Box Text Align', 'kadence-woocommerce-email-designer'),
|
1809 |
'section' => 'addresses',
|
1810 |
-
'default' => self::get_default_value('addresses_text_align'),
|
1811 |
'live_method' => 'css',
|
1812 |
'type' => 'select',
|
1813 |
'choices' => self::get_text_aligns(),
|
1814 |
'selectors' => array(
|
1815 |
-
'#body_content_inner address' => array('text-align'),
|
1816 |
),
|
1817 |
),
|
1818 |
// Footer Background Width
|
1819 |
'footer_background_placement' => array(
|
1820 |
-
'title' => __('Footer Background Placement', 'kadence-woocommerce-email-designer'),
|
1821 |
'section' => 'footer_style',
|
1822 |
-
'default' => self::get_default_value('footer_background_placement'),
|
1823 |
'transport' => 'refresh',
|
1824 |
'type' => 'select',
|
1825 |
'choices' => array(
|
1826 |
-
'inside' => __('Inside Body Container', 'kadence-woocommerce-email-designer'),
|
1827 |
-
'outside' => __('Outside Body Container', 'kadence-woocommerce-email-designer'),
|
1828 |
),
|
1829 |
),
|
1830 |
// Footer Background Color
|
1831 |
'footer_background_color' => array(
|
1832 |
-
'title' => __('Footer Background Color', 'kadence-woocommerce-email-designer'),
|
1833 |
'section' => 'footer_style',
|
1834 |
'control_type' => 'color',
|
1835 |
-
'default' => self::get_default_value('footer_background_color'),
|
1836 |
'live_method' => 'css',
|
1837 |
'selectors' => array(
|
1838 |
-
'#template_footer_container' => array('background-color'),
|
1839 |
),
|
1840 |
),
|
1841 |
// Footer Top Padding
|
1842 |
'footer_top_padding' => array(
|
1843 |
-
'title' => __('Top Padding', 'kadence-woocommerce-email-designer'),
|
1844 |
'control_type' => 'rangevalue',
|
1845 |
'section' => 'footer_style',
|
1846 |
-
'default' => self::get_default_value('footer_top_padding'),
|
1847 |
'live_method' => 'css',
|
1848 |
'selectors' => array(
|
1849 |
-
'#template_footer #template_footer_inside' => array('padding-top'),
|
1850 |
),
|
1851 |
'input_attrs' => array(
|
1852 |
'step' => 1,
|
@@ -1856,13 +2192,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1856 |
),
|
1857 |
// Footer Bottom Padding
|
1858 |
'footer_bottom_padding' => array(
|
1859 |
-
'title' => __('Bottom Padding', 'kadence-woocommerce-email-designer'),
|
1860 |
'control_type' => 'rangevalue',
|
1861 |
'section' => 'footer_style',
|
1862 |
-
'default' => self::get_default_value('footer_bottom_padding'),
|
1863 |
'live_method' => 'css',
|
1864 |
'selectors' => array(
|
1865 |
-
'#template_footer #template_footer_inside' => array('padding-bottom'),
|
1866 |
),
|
1867 |
'input_attrs' => array(
|
1868 |
'step' => 1,
|
@@ -1872,13 +2208,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1872 |
),
|
1873 |
// Footer left and right Padding
|
1874 |
'footer_left_right_padding' => array(
|
1875 |
-
'title' => __('Left/Right Padding', 'kadence-woocommerce-email-designer'),
|
1876 |
'control_type' => 'rangevalue',
|
1877 |
'section' => 'footer_style',
|
1878 |
-
'default' => self::get_default_value('footer_left_right_padding'),
|
1879 |
'live_method' => 'css',
|
1880 |
'selectors' => array(
|
1881 |
-
'#template_footer #template_footer_inside' => array('padding-left', 'padding-right'),
|
1882 |
),
|
1883 |
'input_attrs' => array(
|
1884 |
'step' => 1,
|
@@ -1887,7 +2223,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1887 |
),
|
1888 |
),
|
1889 |
'footer_social_enable' => array(
|
1890 |
-
'title' => __('Enable Social Section', 'kadence-woocommerce-email-designer'),
|
1891 |
'control_type' => 'toggleswitch',
|
1892 |
'section' => 'footer_social',
|
1893 |
'transport' => 'refresh',
|
@@ -1895,7 +2231,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1895 |
),
|
1896 |
// Footer social repeater
|
1897 |
'footer_social_repeater' => array(
|
1898 |
-
'title' => __('Footer Social Options', 'kadence-woocommerce-email-designer'),
|
1899 |
'control_type' => 'repeater',
|
1900 |
'transport' => 'refresh',
|
1901 |
'section' => 'footer_social',
|
@@ -1909,24 +2245,24 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1909 |
),
|
1910 |
// Footer Social Title Color
|
1911 |
'footer_social_title_color' => array(
|
1912 |
-
'title' => __('Footer Social Title Color', 'kadence-woocommerce-email-designer'),
|
1913 |
'section' => 'footer_social',
|
1914 |
-
'default' => self::get_default_value('footer_social_title_color'),
|
1915 |
'live_method' => 'css',
|
1916 |
'selectors' => array(
|
1917 |
-
'#template_footer a.ft-social-link' => array('color'),
|
1918 |
),
|
1919 |
'control_type' => 'color',
|
1920 |
),
|
1921 |
// Footer Social Title Font size
|
1922 |
'footer_social_title_size' => array(
|
1923 |
-
'title' => __('Footer Social Title Font Size', 'kadence-woocommerce-email-designer'),
|
1924 |
'control_type' => 'rangevalue',
|
1925 |
'section' => 'footer_social',
|
1926 |
-
'default' => self::get_default_value('footer_social_title_font_size'),
|
1927 |
'live_method' => 'css',
|
1928 |
'selectors' => array(
|
1929 |
-
'#template_footer .ft-social-title' => array('font-size'),
|
1930 |
),
|
1931 |
'input_attrs' => array(
|
1932 |
'step' => 1,
|
@@ -1936,25 +2272,25 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1936 |
),
|
1937 |
// Footer Social Title Font family
|
1938 |
'footer_social_title_font_family' => array(
|
1939 |
-
'title' => __('Footer Social Title Font Family', 'kadence-woocommerce-email-designer'),
|
1940 |
'section' => 'footer_social',
|
1941 |
-
'default' => self::get_default_value('footer_social_title_font_family'),
|
1942 |
'live_method' => 'css',
|
1943 |
'type' => 'select',
|
1944 |
'choices' => self::get_font_families(),
|
1945 |
'selectors' => array(
|
1946 |
-
'#template_footer a.ft-social-link' => array('font-family'),
|
1947 |
),
|
1948 |
),
|
1949 |
// Footer Social Title Font weight
|
1950 |
'footer_social_title_font_weight' => array(
|
1951 |
-
'title' => __('Footer Social Title Font Weight', 'kadence-woocommerce-email-designer'),
|
1952 |
'control_type' => 'rangevalue',
|
1953 |
'section' => 'footer_social',
|
1954 |
-
'default' => self::get_default_value('footer_social_title_font_weight'),
|
1955 |
'live_method' => 'css',
|
1956 |
'selectors' => array(
|
1957 |
-
'#template_footer .ft-social-title' => array('font-weight'),
|
1958 |
),
|
1959 |
'input_attrs' => array(
|
1960 |
'step' => 100,
|
@@ -1964,13 +2300,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1964 |
),
|
1965 |
// Footer Social Top Padding
|
1966 |
'footer_social_top_padding' => array(
|
1967 |
-
'title' => __('Top Padding', 'kadence-woocommerce-email-designer'),
|
1968 |
'control_type' => 'rangevalue',
|
1969 |
'section' => 'footer_social',
|
1970 |
-
'default' => self::get_default_value('footer_social_top_padding'),
|
1971 |
'live_method' => 'css',
|
1972 |
'selectors' => array(
|
1973 |
-
'#template_footer #footersocial td' => array('padding-top'),
|
1974 |
),
|
1975 |
'input_attrs' => array(
|
1976 |
'step' => 1,
|
@@ -1980,13 +2316,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1980 |
),
|
1981 |
// Footer Social Bottom Padding
|
1982 |
'footer_social_bottom_padding' => array(
|
1983 |
-
'title' => __('Bottom Padding', 'kadence-woocommerce-email-designer'),
|
1984 |
'control_type' => 'rangevalue',
|
1985 |
'section' => 'footer_social',
|
1986 |
-
'default' => self::get_default_value('footer_social_bottom_padding'),
|
1987 |
'live_method' => 'css',
|
1988 |
'selectors' => array(
|
1989 |
-
'#template_footer #footersocial td' => array('padding-bottom'),
|
1990 |
),
|
1991 |
'input_attrs' => array(
|
1992 |
'step' => 1,
|
@@ -1996,13 +2332,13 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
1996 |
),
|
1997 |
// Footer Social Bottom Border width
|
1998 |
'footer_social_border_width' => array(
|
1999 |
-
'title' => __('Footer Social Bottom Border Width', 'kadence-woocommerce-email-designer'),
|
2000 |
'control_type' => 'rangevalue',
|
2001 |
'section' => 'footer_social',
|
2002 |
-
'default' => self::get_default_value('footer_social_border_width'),
|
2003 |
'live_method' => 'css',
|
2004 |
'selectors' => array(
|
2005 |
-
'#footersocial' => array('border-bottom-width'),
|
2006 |
),
|
2007 |
'input_attrs' => array(
|
2008 |
'step' => 1,
|
@@ -2012,56 +2348,56 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
2012 |
),
|
2013 |
// Footer Social Bottom Bordercolor
|
2014 |
'footer_social_border_color' => array(
|
2015 |
-
'title' => __('Footer Social Bottom Border Color', 'kadence-woocommerce-email-designer'),
|
2016 |
'section' => 'footer_social',
|
2017 |
'control_type' => 'color',
|
2018 |
-
'default' => self::get_default_value('footer_social_border_color'),
|
2019 |
'live_method' => 'css',
|
2020 |
'selectors' => array(
|
2021 |
-
'#footersocial' => array('border-bottom-color'),
|
2022 |
),
|
2023 |
),
|
2024 |
//Footer Social Bottom Border style
|
2025 |
'footer_social_border_style' => array(
|
2026 |
-
'title' => __('Footer Social Bottom Border Style', 'kadence-woocommerce-email-designer'),
|
2027 |
'section' => 'footer_social',
|
2028 |
-
'default' => self::get_default_value('footer_social_border_style'),
|
2029 |
'live_method' => 'css',
|
2030 |
'type' => 'select',
|
2031 |
'choices' => array(
|
2032 |
-
'solid' => __('Solid', 'kadence-woocommerce-email-designer'),
|
2033 |
-
'double' => __('Double', 'kadence-woocommerce-email-designer'),
|
2034 |
-
'groove' => __('Groove', 'kadence-woocommerce-email-designer'),
|
2035 |
-
'dotted' => __('Dotted', 'kadence-woocommerce-email-designer'),
|
2036 |
-
'dashed' => __('Dashed', 'kadence-woocommerce-email-designer'),
|
2037 |
-
'ridge' => __('Ridge', 'kadence-woocommerce-email-designer'),
|
2038 |
),
|
2039 |
'selectors' => array(
|
2040 |
-
'#footersocial' => array('border-bottom-style'),
|
2041 |
),
|
2042 |
),
|
2043 |
// Footer Text align
|
2044 |
'footer_text_align' => array(
|
2045 |
-
'title' => __('Text Align', 'kadence-woocommerce-email-designer'),
|
2046 |
'section' => 'footer_content',
|
2047 |
-
'default' => self::get_default_value('footer_text_align'),
|
2048 |
'live_method' => 'css',
|
2049 |
'type' => 'select',
|
2050 |
'choices' => self::get_text_aligns(),
|
2051 |
'selectors' => array(
|
2052 |
-
'#template_footer #credit' => array('text-align'),
|
2053 |
),
|
2054 |
),
|
2055 |
|
2056 |
// Footer Font size
|
2057 |
'footer_font_size' => array(
|
2058 |
-
'title' => __('Font Size', 'kadence-woocommerce-email-designer'),
|
2059 |
'control_type' => 'rangevalue',
|
2060 |
'section' => 'footer_content',
|
2061 |
-
'default' => self::get_default_value('footer_font_size'),
|
2062 |
'live_method' => 'css',
|
2063 |
'selectors' => array(
|
2064 |
-
'#template_footer #credit' => array('font-size'),
|
2065 |
),
|
2066 |
'input_attrs' => array(
|
2067 |
'step' => 1,
|
@@ -2071,26 +2407,26 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
2071 |
),
|
2072 |
// Footer Font family
|
2073 |
'footer_font_family' => array(
|
2074 |
-
'title' => __('Font Family', 'kadence-woocommerce-email-designer'),
|
2075 |
'section' => 'footer_content',
|
2076 |
-
'default' => self::get_default_value('footer_font_family'),
|
2077 |
'live_method' => 'css',
|
2078 |
'type' => 'select',
|
2079 |
'choices' => self::get_font_families(),
|
2080 |
'selectors' => array(
|
2081 |
-
'#template_footer #credit' => array('font-family'),
|
2082 |
),
|
2083 |
),
|
2084 |
|
2085 |
// Footer Font weight
|
2086 |
'footer_font_weight' => array(
|
2087 |
-
'title' => __('Font weight', 'kadence-woocommerce-email-designer'),
|
2088 |
'control_type' => 'rangevalue',
|
2089 |
'section' => 'footer_content',
|
2090 |
-
'default' => self::get_default_value('footer_font_weight'),
|
2091 |
'live_method' => 'css',
|
2092 |
'selectors' => array(
|
2093 |
-
'#template_footer #credit' => array('font-weight'),
|
2094 |
),
|
2095 |
'input_attrs' => array(
|
2096 |
'step' => 100,
|
@@ -2101,24 +2437,24 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
2101 |
|
2102 |
// Footer Color
|
2103 |
'footer_color' => array(
|
2104 |
-
'title' => __('Text Color', 'kadence-woocommerce-email-designer'),
|
2105 |
'section' => 'footer_content',
|
2106 |
'control_type' => 'color',
|
2107 |
-
'default' => self::get_default_value('footer_color'),
|
2108 |
'live_method' => 'css',
|
2109 |
'selectors' => array(
|
2110 |
-
'#template_footer #credit' => array('color'),
|
2111 |
),
|
2112 |
),
|
2113 |
// Footer credit Top Padding
|
2114 |
'footer_credit_top_padding' => array(
|
2115 |
-
'title' => __('Top Padding', 'kadence-woocommerce-email-designer'),
|
2116 |
'control_type' => 'rangevalue',
|
2117 |
'section' => 'footer_content',
|
2118 |
-
'default' => self::get_default_value('footer_credit_top_padding'),
|
2119 |
'live_method' => 'css',
|
2120 |
'selectors' => array(
|
2121 |
-
'#template_footer #credit' => array('padding-top'),
|
2122 |
),
|
2123 |
'input_attrs' => array(
|
2124 |
'step' => 1,
|
@@ -2128,13 +2464,111 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
2128 |
),
|
2129 |
// Footer credit Bottom Padding
|
2130 |
'footer_credit_bottom_padding' => array(
|
2131 |
-
'title' => __('Bottom Padding', 'kadence-woocommerce-email-designer'),
|
2132 |
'control_type' => 'rangevalue',
|
2133 |
'section' => 'footer_content',
|
2134 |
-
'default' => self::get_default_value('footer_credit_bottom_padding'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2135 |
'live_method' => 'css',
|
2136 |
'selectors' => array(
|
2137 |
-
'
|
2138 |
),
|
2139 |
'input_attrs' => array(
|
2140 |
'step' => 1,
|
@@ -2142,8 +2576,64 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
2142 |
'max' => 150,
|
2143 |
),
|
2144 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2145 |
'custom_css' => array(
|
2146 |
-
'title' => __('Custom CSS', 'kadence-woocommerce-email-designer'),
|
2147 |
'section' => 'custom_styles',
|
2148 |
'default' => '',
|
2149 |
'type' => 'textarea',
|
@@ -2154,16 +2644,16 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
2154 |
),
|
2155 |
),
|
2156 |
'import_export' => array(
|
2157 |
-
'title' => __('Import Export', 'kadence-woocommerce-email-designer'),
|
2158 |
'section' => 'import_export',
|
2159 |
'default' => '',
|
2160 |
'control_type' => 'kwdimportexport',
|
2161 |
),
|
2162 |
'email_recipient' => array(
|
2163 |
-
'title' => __('Preview Email Recipient', 'kadence-woocommerce-email-designer'),
|
2164 |
'description' => __( 'Enter recipients (comma separated) for preview emails', 'kadence-woocommerce-email-designer' ),
|
2165 |
'section' => 'send_email',
|
2166 |
-
'default' => self::get_default_value('email_recipient'),
|
2167 |
'control_type' => 'kwdsendemail',
|
2168 |
),
|
2169 |
);
|
@@ -2184,7 +2674,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
2184 |
public static function get_default_values() {
|
2185 |
// Define default values
|
2186 |
if ( is_null( self::$default_values ) ) {
|
2187 |
-
|
2188 |
'preview_order_id' => 'mockup',
|
2189 |
'email_type' => 'new_order',
|
2190 |
'email_templates' => 'default',
|
@@ -2193,6 +2683,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
2193 |
'border_radius' => '3',
|
2194 |
'border_width' => '1',
|
2195 |
'border_color' => '#dedede',
|
|
|
2196 |
'shadow' => '1',
|
2197 |
'content_width' => '600',
|
2198 |
'email_padding' => '70',
|
@@ -2202,6 +2693,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
2202 |
'header_image_align' => 'center',
|
2203 |
'header_image_background_color' => 'transparent',
|
2204 |
'header_image_padding_top_bottom' => '0',
|
|
|
2205 |
|
2206 |
'woocommerce_waitlist_mailout_body' => __( 'Hi There,', 'kadence-woocommerce-email-designer' ),
|
2207 |
'woocommerce_waitlist_mailout_heading' => __( '{product_title} is now back in stock at {site_title}', 'kadence-woocommerce-email-designer' ),
|
@@ -2220,10 +2712,11 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
2220 |
'customer_completed_switch_order_subject' => __( 'Your {site_title} order from {order_date} is complete', 'kadence-woocommerce-email-designer' ),
|
2221 |
'customer_completed_switch_order_body' => __( 'Hi there. You have successfully changed your subscription items on {site_title}. Your new order and subscription details are shown below for your reference:', 'kadence-woocommerce-email-designer' ),
|
2222 |
|
2223 |
-
'customer_renewal_invoice_heading'
|
2224 |
-
'customer_renewal_invoice_subject'
|
2225 |
-
'customer_renewal_invoice_body'
|
2226 |
-
'
|
|
|
2227 |
|
2228 |
|
2229 |
'cancelled_subscription_heading' => __( 'Subscription Cancelled', 'kadence-woocommerce-email-designer' ),
|
@@ -2248,6 +2741,7 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
2248 |
'customer_new_account_heading' => __( 'Welcome to {site_title}', 'kadence-woocommerce-email-designer' ),
|
2249 |
'customer_note_heading' => __( 'A note has been added to your order', 'kadence-woocommerce-email-designer' ),
|
2250 |
'customer_reset_password_heading' => __( 'Password reset instructions', 'kadence-woocommerce-email-designer' ),
|
|
|
2251 |
|
2252 |
'new_order_subject' => __( '[{site_title}] New customer order ({order_number}) - {order_date}', 'kadence-woocommerce-email-designer' ),
|
2253 |
'cancelled_order_subject' => __( '[{site_title}] Cancelled order ({order_number})', 'kadence-woocommerce-email-designer' ),
|
@@ -2277,12 +2771,15 @@ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
|
|
2277 |
|
2278 |
'customer_on_hold_order_body' => __( 'Your order is on-hold until we confirm payment has been received. Your order details are shown below for your reference:', 'kadence-woocommerce-email-designer' ),
|
2279 |
'customer_invoice_switch' => true,
|
|
|
2280 |
'customer_invoice_body' => __( 'An order has been created for you on {site_title}. {invoice_pay_link}', 'kadence-woocommerce-email-designer' ),
|
2281 |
'customer_invoice_body_paid' => '',
|
2282 |
'failed_order_body' => __( 'Payment for order {order_number} from {customer_full_name} has failed. The order was as follows:', 'kadence-woocommerce-email-designer' ),
|
2283 |
-
|
2284 |
-
'
|
2285 |
-
'
|
|
|
|
|
2286 |
|
2287 |
Username: {customer_username}
|
2288 |
|
@@ -2357,15 +2854,28 @@ To reset your password, visit the following address:', 'kadence-woocommerce-emai
|
|
2357 |
'h3_color' => '#787878',
|
2358 |
'h3_font_weight' => '500',
|
2359 |
|
2360 |
-
'
|
2361 |
-
'
|
2362 |
-
'
|
2363 |
-
'
|
2364 |
-
'
|
2365 |
-
'
|
2366 |
-
'
|
2367 |
-
'
|
2368 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2369 |
'addresses_border_width' => '1',
|
2370 |
'addresses_border_color' => '#e5e5e5',
|
2371 |
'addresses_border_style' => 'solid',
|
@@ -2398,11 +2908,12 @@ To reset your password, visit the following address:', 'kadence-woocommerce-emai
|
|
2398 |
'footer_credit_bottom_padding' => '0',
|
2399 |
'footer_credit_top_padding' => '0',
|
2400 |
|
2401 |
-
'items_table_border_width'
|
2402 |
-
'items_table_border_color'
|
2403 |
-
'footer_content_text'
|
2404 |
-
'email_recipient'
|
2405 |
);
|
|
|
2406 |
}
|
2407 |
|
2408 |
// Return default values
|
@@ -2417,11 +2928,11 @@ To reset your password, visit the following address:', 'kadence-woocommerce-emai
|
|
2417 |
* @return string
|
2418 |
*/
|
2419 |
public static function get_default_value( $key ) {
|
2420 |
-
// Get default values
|
2421 |
$default_values = self::get_default_values();
|
2422 |
|
2423 |
-
// Check if such key exists and return default value
|
2424 |
-
return isset($default_values[$key]) ? $default_values[$key] : '';
|
2425 |
}
|
2426 |
|
2427 |
/**
|
@@ -2432,16 +2943,16 @@ To reset your password, visit the following address:', 'kadence-woocommerce-emai
|
|
2432 |
*/
|
2433 |
public static function get_border_styles() {
|
2434 |
return array(
|
2435 |
-
'none'
|
2436 |
-
'hidden'
|
2437 |
-
'dotted'
|
2438 |
-
'dashed'
|
2439 |
-
'solid'
|
2440 |
-
'double'
|
2441 |
-
'groove'
|
2442 |
-
'ridge'
|
2443 |
-
'inset'
|
2444 |
-
'outset'
|
2445 |
);
|
2446 |
}
|
2447 |
|
@@ -2453,10 +2964,10 @@ To reset your password, visit the following address:', 'kadence-woocommerce-emai
|
|
2453 |
*/
|
2454 |
public static function get_text_aligns() {
|
2455 |
return array(
|
2456 |
-
'left'
|
2457 |
-
'center'
|
2458 |
-
'right'
|
2459 |
-
'justify'
|
2460 |
);
|
2461 |
}
|
2462 |
/**
|
@@ -2467,9 +2978,9 @@ To reset your password, visit the following address:', 'kadence-woocommerce-emai
|
|
2467 |
*/
|
2468 |
public static function get_image_aligns() {
|
2469 |
return array(
|
2470 |
-
'left'
|
2471 |
-
'center'
|
2472 |
-
'right'
|
2473 |
);
|
2474 |
}
|
2475 |
/**
|
@@ -2480,7 +2991,7 @@ To reset your password, visit the following address:', 'kadence-woocommerce-emai
|
|
2480 |
*/
|
2481 |
public static function get_order_ids() {
|
2482 |
if ( is_null( self::$order_ids ) ) {
|
2483 |
-
$order_array
|
2484 |
$order_array['mockup'] = __( 'Mockup Order', 'kadence-woocommerce-email-designer' );
|
2485 |
$orders = new WP_Query(
|
2486 |
array(
|
1 |
<?php
|
2 |
/**
|
3 |
* Customizer Mail Settings
|
4 |
+
*
|
5 |
+
* @package Kadence WooCommerce Email Designer
|
6 |
*/
|
7 |
|
8 |
/**
|
19 |
*/
|
20 |
class Kadence_Woomail_Settings {
|
21 |
/**
|
22 |
+
* The panels for customizer.
|
23 |
+
*
|
24 |
+
* @var null
|
25 |
+
*/
|
26 |
+
private static $panels = null;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* The sections for customizer.
|
30 |
+
*
|
31 |
+
* @var null
|
32 |
+
*/
|
33 |
+
private static $sections = null;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* The settings for customizer.
|
37 |
+
*
|
38 |
+
* @var null
|
39 |
+
*/
|
40 |
+
private static $settings = null;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* The woo settings copy for customizer.
|
44 |
+
*
|
45 |
* @var null
|
46 |
*/
|
|
|
|
|
|
|
47 |
private static $woo_copy_settings = null;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* The woo settings for customizer.
|
51 |
+
*
|
52 |
+
* @var null
|
53 |
+
*/
|
54 |
+
private static $woo_settings = null;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* The defualt values for customizer.
|
58 |
+
*
|
59 |
+
* @var null
|
60 |
+
*/
|
61 |
+
private static $default_values = null;
|
62 |
+
|
63 |
+
/**
|
64 |
+
* The order ids.
|
65 |
+
*
|
66 |
+
* @var null
|
67 |
+
*/
|
68 |
+
private static $order_ids = null;
|
69 |
+
|
70 |
+
/**
|
71 |
+
* The emails types.
|
72 |
+
*
|
73 |
+
* @var null
|
74 |
+
*/
|
75 |
+
private static $email_types = null;
|
76 |
+
|
77 |
+
/**
|
78 |
+
* The availible text edit email types.
|
79 |
+
*
|
80 |
+
* @var null
|
81 |
+
*/
|
82 |
private static $customized_email_types = null;
|
83 |
|
84 |
+
/**
|
85 |
+
* The availible font options.
|
86 |
+
*
|
87 |
+
* @var array
|
88 |
+
*/
|
89 |
public static $font_family_mapping = array(
|
90 |
+
'helvetica' => '"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',
|
91 |
+
'arial' => 'Arial, Helvetica, sans-serif',
|
92 |
+
'arial_black' => '"Arial Black", Gadget, sans-serif',
|
93 |
+
'courier' => '"Courier New", Courier, monospace',
|
94 |
+
'impact' => 'Impact, Charcoal, sans-serif',
|
95 |
+
'lucida' => '"Lucida Sans Unicode", "Lucida Grande", sans-serif',
|
96 |
+
'palatino' => '"Palatino Linotype", "Book Antiqua", Palatino, serif',
|
97 |
+
'georgia' => 'Georgia, serif',
|
98 |
);
|
99 |
+
|
100 |
+
/**
|
101 |
+
* The normal core email types.
|
102 |
+
*
|
103 |
+
* @var array
|
104 |
+
*/
|
105 |
public static $email_types_mapping = array(
|
106 |
'new_order' => 'New Order',
|
107 |
'cancelled_order' => 'Cancelled Order',
|
115 |
'customer_note' => 'Customer Note',
|
116 |
'customer_reset_password' => 'Customer Reset Password',
|
117 |
);
|
118 |
+
|
119 |
+
/**
|
120 |
+
* The woocommerce subscriptions email types.
|
121 |
+
*
|
122 |
+
* @var array
|
123 |
+
*/
|
124 |
public static $subscription_email_types_mapping = array(
|
125 |
+
'new_renewal_order' => 'New Renewal Order',
|
126 |
'customer_processing_renewal_order' => 'Customer Processing Renewal Order',
|
127 |
+
'customer_completed_renewal_order' => 'Customer Completed Renewal Order',
|
128 |
+
'customer_completed_switch_order' => 'Customer Completed Switch Order',
|
129 |
+
'customer_renewal_invoice' => 'Customer Renewal Invoice',
|
130 |
+
'cancelled_subscription' => 'Cancelled Subscription',
|
131 |
);
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Woocommerce Membership Email Types
|
135 |
+
*
|
136 |
+
* @var array
|
137 |
+
*/
|
138 |
public static $membership_email_types_mapping = array(
|
139 |
'WC_Memberships_User_Membership_Note_Email' => 'User Membership Note',
|
140 |
'WC_Memberships_User_Membership_Ending_Soon_Email' => 'User Membership Ending Soon',
|
142 |
'WC_Memberships_User_Membership_Renewal_Reminder_Email' => 'User Membership Renewal Reminder',
|
143 |
'WC_Memberships_User_Membership_Activated_Email' => 'User Membership Activated',
|
144 |
);
|
145 |
+
/**
|
146 |
+
* WC Marketplace Email Types
|
147 |
+
*
|
148 |
+
* @var array
|
149 |
+
*/
|
150 |
public static $marketplace_email_types_mapping = array(
|
151 |
'vendor_new_account' => 'New Vendor Account',
|
152 |
'admin_new_vendor' => 'Admin New Vendor Account',
|
162 |
'vendor_orders_stats_report' => 'Vendor orders stats report',
|
163 |
'vendor_contact_widget_email' => 'Vendor Contact Email',
|
164 |
);
|
165 |
+
/**
|
166 |
+
* Subscriptio Email Types
|
167 |
+
*
|
168 |
+
* @var array
|
169 |
+
*
|
170 |
+
public static $subscriptio_email_types_mapping = array(
|
171 |
+
'customer_subscription_new_order' => 'Subscription new order',
|
172 |
+
'customer_subscription_processing_order' => 'Subscription processing order',
|
173 |
+
'customer_subscription_completed_order' => 'Subscription completed order',
|
174 |
+
'customer_subscription_paused' => 'Subscription paused',
|
175 |
+
'customer_subscription_resumed' => 'Subscription resumed',
|
176 |
+
'customer_subscription_suspended' => 'Subscription suspended',
|
177 |
+
'customer_subscription_payment_overdue' => 'Subscription payment overdue',
|
178 |
+
'customer_subscription_payment_reminder' => 'Subscription payment reminder',
|
179 |
+
'customer_subscription_expired' => 'Subscription expired',
|
180 |
+
'customer_subscription_cancelled' => 'Subscription cancelled',
|
181 |
+
);
|
182 |
+
*/
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Woocommerce Waitlist Email Types
|
186 |
+
*
|
187 |
+
* @var array
|
188 |
+
*/
|
189 |
public static $waitlist_email_types_mapping = array(
|
190 |
'woocommerce_waitlist_mailout' => 'Waitlist Mailout',
|
191 |
);
|
192 |
|
193 |
+
/**
|
194 |
+
* Get our prebuilt tempaltes.
|
195 |
+
*
|
196 |
+
* @var array
|
197 |
+
*/
|
198 |
public static $prebuilt_templates_mapping = array(
|
199 |
'kt_full' => 'assets/images/kt_full_template.jpg',
|
200 |
'kt_skinny' => 'assets/images/kt_skinny_template.jpg',
|
236 |
}
|
237 |
|
238 |
/**
|
239 |
+
* Get our Customizer sections
|
240 |
+
*
|
241 |
+
* @access public
|
242 |
+
* @return array
|
243 |
+
*/
|
244 |
public static function get_sections() {
|
245 |
+
// Define sections.
|
246 |
if ( is_null( self::$sections ) ) {
|
247 |
self::$sections = array(
|
248 |
'template' => array(
|
249 |
+
'title' => __( 'Prebuilt Templates', 'kadence-woocommerce-email-designer' ),
|
250 |
+
'priority' => 8,
|
251 |
),
|
252 |
+
// Text and Type.
|
253 |
'mtype' => array(
|
254 |
+
'title' => __( 'Email Type and Text', 'kadence-woocommerce-email-designer' ),
|
255 |
+
'priority' => 10,
|
256 |
),
|
257 |
+
// Container.
|
258 |
'container' => array(
|
259 |
+
'title' => __( 'Container', 'kadence-woocommerce-email-designer' ),
|
260 |
+
'priority' => 15,
|
261 |
),
|
262 |
|
263 |
+
// Header Style.
|
264 |
'header_style' => array(
|
265 |
+
'title' => __( 'Header Style', 'kadence-woocommerce-email-designer' ),
|
266 |
+
'panel' => 'header',
|
267 |
+
'priority' => 20,
|
268 |
),
|
269 |
|
270 |
+
// Header Image.
|
271 |
'header_image' => array(
|
272 |
+
'title' => __( 'Header Image', 'kadence-woocommerce-email-designer' ),
|
273 |
+
'panel' => 'header',
|
274 |
+
'priority' => 20,
|
275 |
),
|
276 |
|
277 |
+
// Heading.
|
278 |
'heading' => array(
|
279 |
+
'title' => __( 'Heading', 'kadence-woocommerce-email-designer' ),
|
280 |
+
'panel' => 'header',
|
281 |
+
'priority' => 30,
|
282 |
),
|
283 |
|
284 |
+
// Footer Style.
|
285 |
'footer_style' => array(
|
286 |
+
'title' => __( 'Footer Style', 'kadence-woocommerce-email-designer' ),
|
287 |
+
'panel' => 'footer',
|
288 |
+
'priority' => 40,
|
289 |
),
|
290 |
+
// Footer social.
|
291 |
'footer_social' => array(
|
292 |
'title' => __( 'Footer Social', 'kadence-woocommerce-email-designer' ),
|
293 |
'panel' => 'footer',
|
294 |
'priority' => 50,
|
295 |
),
|
296 |
+
// Footer Content.
|
297 |
'footer_content' => array(
|
298 |
'title' => __( 'Footer Credit Content', 'kadence-woocommerce-email-designer' ),
|
299 |
'panel' => 'footer',
|
300 |
'priority' => 60,
|
301 |
),
|
302 |
+
// Content Container.
|
|
|
303 |
'content_container' => array(
|
304 |
'title' => __( 'Content Container', 'kadence-woocommerce-email-designer' ),
|
305 |
'panel' => 'content',
|
306 |
'priority' => 5,
|
307 |
),
|
308 |
+
// Heading Style.
|
309 |
'headings_style' => array(
|
310 |
'title' => __( 'Content Headings Style', 'kadence-woocommerce-email-designer' ),
|
311 |
'panel' => 'content',
|
335 |
'panel' => 'content',
|
336 |
'priority' => 5,
|
337 |
),
|
338 |
+
// Button Styles.
|
339 |
+
'btn_styles' => array(
|
340 |
+
'title' => __( 'Button Styles', 'kadence-woocommerce-email-designer' ),
|
341 |
+
'panel' => 'content',
|
342 |
+
'priority' => 10,
|
343 |
+
),
|
344 |
// Custom Styles.
|
345 |
'custom_styles' => array(
|
346 |
'title' => __( 'Custom Styles', 'kadence-woocommerce-email-designer' ),
|
375 |
|
376 |
// Email header image.
|
377 |
$base_options[ 'woocommerce_email_header_image' ] = array(
|
378 |
+
'title' => __( 'Header Image', 'kadence-woocommerce-email-designer' ),
|
379 |
'control_type' => 'image',
|
380 |
'section' => 'header_image',
|
381 |
'default' => self::get_default_value( 'header_image' ),
|
388 |
);
|
389 |
// Email background color
|
390 |
$base_options['woocommerce_email_background_color'] = array(
|
391 |
+
'title' => __( 'Container Background color', 'kadence-woocommerce-email-designer' ),
|
392 |
'section' => 'container',
|
393 |
'control_type' => 'color',
|
394 |
'priority' => 5,
|
395 |
+
'default' => self::get_default_value( 'body_background_color' ),
|
396 |
'live_method' => 'css',
|
397 |
'selectors' => array(
|
398 |
+
'body' => array( 'background-color' ),
|
399 |
+
'#wrapper' => array( 'background-color' ),
|
400 |
),
|
401 |
);
|
402 |
// Email text color
|
403 |
$base_options['woocommerce_email_text_color'] = array(
|
404 |
+
'title' => __( 'Content Text color', 'kadence-woocommerce-email-designer' ),
|
405 |
'section' => 'text_style',
|
406 |
'control_type' => 'color',
|
407 |
+
'default' => self::get_default_value( 'text_color' ),
|
408 |
'live_method' => 'css',
|
409 |
'selectors' => array(
|
410 |
+
'#body_content_inner' => array( 'color' ),
|
411 |
+
'.td' => array( 'color' ),
|
412 |
+
'.text' => array( 'color' ),
|
413 |
+
'address' => array( 'color' ),
|
414 |
),
|
415 |
);
|
416 |
// Email body background color
|
417 |
$base_options['woocommerce_email_body_background_color'] = array(
|
418 |
+
'title' => __( 'Content Background color', 'kadence-woocommerce-email-designer' ),
|
419 |
'section' => 'content_container',
|
420 |
'control_type' => 'color',
|
421 |
'priority' => 5,
|
422 |
+
'default' => self::get_default_value( 'background_color' ),
|
423 |
'live_method' => 'css',
|
424 |
'selectors' => array(
|
425 |
+
'#body_content' => array( 'background-color' ),
|
426 |
+
'#template_container' => array( 'background-color' ),
|
427 |
+
'h2 .separator-bubble' => array( 'background-color')
|
428 |
),
|
429 |
);
|
430 |
// Footer Content Footer text
|
431 |
$base_options['woocommerce_email_footer_text'] = array(
|
432 |
+
'title' => __( 'Footer text', 'kadence-woocommerce-email-designer' ),
|
433 |
'type' => 'textarea',
|
434 |
'section' => 'footer_content',
|
435 |
'default' => self::get_default_value( 'footer_content_text' ),
|
444 |
// Email recipients Text
|
445 |
if ( 'cancelled_order' == $key || 'new_order' == $key || 'failed_order' == $key ) {
|
446 |
$email_text['woocommerce_'.$key.'_settings[recipient]'] = array(
|
447 |
+
'title' => __( 'Recipient(s)', 'kadence-woocommerce-email-designer' ),
|
448 |
'type' => 'text',
|
449 |
'section' => 'mtype',
|
450 |
'priority' => 5,
|
460 |
if ( 'customer_refunded_order' == $key ) {
|
461 |
// Email Subject
|
462 |
$email_text['woocommerce_'.$key.'_settings[subject_full]'] = array(
|
463 |
+
'title' => __( 'Full refund subject', 'kadence-woocommerce-email-designer' ),
|
464 |
'type' => 'text',
|
465 |
'section' => 'mtype',
|
466 |
'priority' => 5,
|
476 |
);
|
477 |
// Email Subject
|
478 |
$email_text['woocommerce_'.$key.'_settings[subject_partial]'] = array(
|
479 |
+
'title' => __( 'Partial refund subject', 'kadence-woocommerce-email-designer' ),
|
480 |
'type' => 'text',
|
481 |
'section' => 'mtype',
|
482 |
'priority' => 5,
|
492 |
);
|
493 |
// Email Header Text
|
494 |
$email_text['woocommerce_'.$key.'_settings[heading_full]'] = array(
|
495 |
+
'title' => __( 'Full refund Heading Text', 'kadence-woocommerce-email-designer' ),
|
496 |
'type' => 'text',
|
497 |
'section' => 'mtype',
|
498 |
'priority' => 5,
|
510 |
'value' => $key,
|
511 |
),
|
512 |
);
|
513 |
+
// Email Header Text,
|
514 |
+
$email_text['woocommerce_' . $key . '_settings[heading_partial]'] = array(
|
515 |
+
'title' => __( 'Partial refund Heading Text', 'kadence-woocommerce-email-designer' ),
|
516 |
'type' => 'text',
|
517 |
'section' => 'mtype',
|
518 |
'priority' => 5,
|
527 |
),
|
528 |
);
|
529 |
} else {
|
530 |
+
// Email Subject.
|
531 |
+
$email_text['woocommerce_' . $key . '_settings[subject]'] = array(
|
532 |
+
'title' => __( 'Subject Text', 'kadence-woocommerce-email-designer' ),
|
533 |
'type' => 'text',
|
534 |
'section' => 'mtype',
|
535 |
'priority' => 5,
|
536 |
'default' => '',
|
537 |
'input_attrs' => array(
|
538 |
+
'placeholder' => self::get_default_value( $key . '_subject' ),
|
539 |
),
|
540 |
'active_callback' => array(
|
541 |
'id' => 'email_type',
|
544 |
),
|
545 |
);
|
546 |
if ( 'customer_invoice' == $key ) {
|
547 |
+
$email_text['woocommerce_' . $key . '_settings[subject_paid]'] = array(
|
548 |
+
'title' => __( 'Subject (paid) Text', 'kadence-woocommerce-email-designer' ),
|
549 |
'type' => 'text',
|
550 |
'section' => 'mtype',
|
551 |
'priority' => 5,
|
560 |
),
|
561 |
);
|
562 |
}
|
563 |
+
// Email Header Text.
|
564 |
+
$email_text['woocommerce_' . $key . '_settings[heading]'] = array(
|
565 |
+
'title' => __( 'Heading Text', 'kadence-woocommerce-email-designer' ),
|
566 |
'type' => 'text',
|
567 |
'section' => 'mtype',
|
568 |
'priority' => 5,
|
569 |
'default' => '',
|
570 |
+
'input_attrs' => array(
|
571 |
+
'placeholder' => self::get_default_value( $key . '_heading' ),
|
572 |
),
|
573 |
'live_method' => 'replace',
|
574 |
+
'selectors' => array( '#header_wrapper h1' ),
|
|
|
|
|
575 |
'active_callback' => array(
|
576 |
'id' => 'email_type',
|
577 |
'compare' => '==',
|
579 |
),
|
580 |
);
|
581 |
if ( 'customer_invoice' == $key ) {
|
582 |
+
$email_text['woocommerce_' . $key . '_settings[heading_paid]'] = array(
|
583 |
+
'title' => __( 'Heading (paid) Text', 'kadence-woocommerce-email-designer' ),
|
584 |
'type' => 'text',
|
585 |
'section' => 'mtype',
|
586 |
'priority' => 5,
|
595 |
),
|
596 |
);
|
597 |
}
|
598 |
+
if ( version_compare( WC_VERSION, '3.7', '>' ) ) {
|
599 |
+
$email_text['woocommerce_' . $key . '_settings[additional_content]'] = array(
|
600 |
+
'title' => __( 'Additional content', 'kadence-woocommerce-email-designer' ),
|
601 |
+
'type' => 'textarea',
|
602 |
+
'section' => 'mtype',
|
603 |
+
'priority' => 20,
|
604 |
+
'default' => '',
|
605 |
+
'input_attrs' => array(
|
606 |
+
'placeholder' => self::get_default_value( $key . '_additional_content' ),
|
607 |
+
),
|
608 |
+
'transport' => 'refresh',
|
609 |
+
'active_callback' => array(
|
610 |
+
'id' => 'email_type',
|
611 |
+
'compare' => '==',
|
612 |
+
'value' => $key,
|
613 |
+
),
|
614 |
+
);
|
615 |
+
}
|
616 |
}
|
617 |
}
|
618 |
+
self::$woo_settings = array_merge( $base_options, $email_text );
|
619 |
}
|
620 |
return self::$woo_settings;
|
621 |
}
|
647 |
'type' => 'select',
|
648 |
'priority' => 1,
|
649 |
'choices' => self::get_order_ids(),
|
650 |
+
'default' => self::get_default_value( 'preview_order_id' ),
|
651 |
'transport' => 'refresh',
|
652 |
),
|
653 |
// Email Type.
|
675 |
foreach ( self::get_customized_email_types() as $key => $value ) {
|
676 |
// Email Subtitle Text
|
677 |
$extra_email_text[$key.'_subtitle'] = array(
|
678 |
+
'title' => __( 'Subtitle Text', 'kadence-woocommerce-email-designer' ),
|
679 |
'type' => 'text',
|
680 |
'section' => 'mtype',
|
681 |
'default' => '',
|
690 |
'value' => $key,
|
691 |
),
|
692 |
);
|
693 |
+
if ( 'customer_new_account' == $key ) {
|
694 |
+
$extra_email_text[ $key . '_btn_switch' ] = array(
|
695 |
+
'title' => __( 'Switch account link to button', 'kadence-woocommerce-email-designer' ),
|
696 |
+
'control_type' => 'toggleswitch',
|
697 |
+
'section' => 'mtype',
|
698 |
+
'transport' => 'refresh',
|
699 |
+
'default' => self::get_default_value( $key . '_switch' ),
|
700 |
+
'original' => '',
|
701 |
+
'priority' => 3,
|
702 |
+
'active_callback' => array(
|
703 |
+
'id' => 'email_type',
|
704 |
+
'compare' => '==',
|
705 |
+
'value' => $key,
|
706 |
+
),
|
707 |
+
);
|
708 |
+
}
|
709 |
if ( 'customer_refunded_order' == $key ) {
|
710 |
// Email preview switch
|
711 |
$extra_email_text[$key.'_switch'] = array(
|
712 |
+
'title' => __( 'Switch off for Partial Refund Preview', 'kadence-woocommerce-email-designer' ),
|
713 |
'control_type' => 'toggleswitch',
|
714 |
'section' => 'mtype',
|
715 |
'transport' => 'refresh',
|
724 |
);
|
725 |
// Email Body Text
|
726 |
$extra_email_text[$key.'_body_full'] = array(
|
727 |
+
'title' => __( 'Body Full Refund Text', 'kadence-woocommerce-email-designer' ),
|
728 |
'type' => 'textarea',
|
729 |
'section' => 'mtype',
|
730 |
'default' => self::get_default_value( $key.'_body_full' ),
|
738 |
);
|
739 |
// Email Body Text
|
740 |
$extra_email_text[$key.'_body_partial'] = array(
|
741 |
+
'title' => __( 'Body Partial Refund Text', 'kadence-woocommerce-email-designer' ),
|
742 |
'type' => 'textarea',
|
743 |
'section' => 'mtype',
|
744 |
'default' => self::get_default_value( $key.'_body_partial' ),
|
752 |
);
|
753 |
} else if ( 'customer_invoice' == $key ) {
|
754 |
// Email preview switch
|
755 |
+
$extra_email_text[ $key.'_switch'] = array(
|
756 |
+
'title' => __( 'Switch off for unpaid preview', 'kadence-woocommerce-email-designer' ),
|
757 |
'control_type' => 'toggleswitch',
|
758 |
'section' => 'mtype',
|
759 |
'transport' => 'refresh',
|
766 |
'value' => $key,
|
767 |
),
|
768 |
);
|
769 |
+
// Email preview switch.
|
770 |
+
$extra_email_text[ $key . '_btn_switch' ] = array(
|
771 |
+
'title' => __( 'Make "Pay for this Order" a button', 'kadence-woocommerce-email-designer' ),
|
772 |
+
'control_type' => 'toggleswitch',
|
773 |
+
'section' => 'mtype',
|
774 |
+
'transport' => 'refresh',
|
775 |
+
'default' => self::get_default_value( $key . '_btn_switch' ),
|
776 |
+
'original' => '',
|
777 |
+
'active_callback' => array(
|
778 |
+
'id' => 'email_type',
|
779 |
+
'compare' => '==',
|
780 |
+
'value' => $key,
|
781 |
+
),
|
782 |
+
);
|
783 |
// Email Body Text
|
784 |
$extra_email_text[$key.'_body_paid'] = array(
|
785 |
+
'title' => __( 'Body Invoice Paid Text', 'kadence-woocommerce-email-designer' ),
|
786 |
'type' => 'textarea',
|
787 |
'section' => 'mtype',
|
788 |
'default' => self::get_default_value( $key.'_body_paid' ),
|
796 |
);
|
797 |
// Email Body Text
|
798 |
$extra_email_text[$key.'_body'] = array(
|
799 |
+
'title' => __( 'Body Invoice Pending Payment Text', 'kadence-woocommerce-email-designer' ),
|
800 |
'type' => 'textarea',
|
801 |
'section' => 'mtype',
|
802 |
'default' => self::get_default_value( $key.'_body' ),
|
807 |
'value' => $key,
|
808 |
),
|
809 |
);
|
810 |
+
} else if ( 'customer_renewal_invoice' == $key ) {
|
811 |
+
// Button Switch.
|
812 |
+
$extra_email_text[ $key . '_btn_switch' ] = array(
|
813 |
+
'title' => __( 'Make "Pay Now" a button', 'kadence-woocommerce-email-designer' ),
|
814 |
+
'control_type' => 'toggleswitch',
|
815 |
+
'section' => 'mtype',
|
816 |
+
'transport' => 'refresh',
|
817 |
+
'default' => self::get_default_value( $key . '_btn_switch' ),
|
818 |
+
'original' => '',
|
819 |
+
'active_callback' => array(
|
820 |
+
'id' => 'email_type',
|
821 |
+
'compare' => '==',
|
822 |
+
'value' => $key,
|
823 |
+
),
|
824 |
+
);
|
825 |
// Email Body Text
|
826 |
$extra_email_text[$key.'_body_failed'] = array(
|
827 |
+
'title' => __( 'Body Invoice Failed Text', 'kadence-woocommerce-email-designer' ),
|
828 |
'type' => 'textarea',
|
829 |
'section' => 'mtype',
|
830 |
'default' => self::get_default_value( $key.'_body_failed' ),
|
838 |
);
|
839 |
// Email Body Text
|
840 |
$extra_email_text[$key.'_body'] = array(
|
841 |
+
'title' => __( 'Body Invoice Pending Payment Text', 'kadence-woocommerce-email-designer' ),
|
842 |
+
'type' => 'textarea',
|
843 |
+
'section' => 'mtype',
|
844 |
+
'default' => self::get_default_value( $key.'_body' ),
|
845 |
+
'original' => '',
|
846 |
+
'active_callback' => array(
|
847 |
+
'id' => 'email_type',
|
848 |
+
'compare' => '==',
|
849 |
+
'value' => $key,
|
850 |
+
),
|
851 |
+
);
|
852 |
+
} else if ( 'customer_reset_password' == $key ) {
|
853 |
+
// Email preview switch.
|
854 |
+
$extra_email_text[ $key . '_btn_switch' ] = array(
|
855 |
+
'title' => __( 'Make "reset your password" a button', 'kadence-woocommerce-email-designer' ),
|
856 |
+
'control_type' => 'toggleswitch',
|
857 |
+
'section' => 'mtype',
|
858 |
+
'transport' => 'refresh',
|
859 |
+
'default' => self::get_default_value( $key . '_switch' ),
|
860 |
+
'original' => '',
|
861 |
+
'active_callback' => array(
|
862 |
+
'id' => 'email_type',
|
863 |
+
'compare' => '==',
|
864 |
+
'value' => $key,
|
865 |
+
),
|
866 |
+
);
|
867 |
+
// Email Body Text
|
868 |
+
$extra_email_text[ $key . '_body'] = array(
|
869 |
+
'title' => __( 'Body Text', 'kadence-woocommerce-email-designer' ),
|
870 |
'type' => 'textarea',
|
871 |
'section' => 'mtype',
|
872 |
'default' => self::get_default_value( $key.'_body' ),
|
879 |
);
|
880 |
} else {
|
881 |
// Email Body Text.
|
882 |
+
$extra_email_text[ $key . '_body' ] = array(
|
883 |
'title' => __( 'Body Text', 'kadence-woocommerce-email-designer' ),
|
884 |
'type' => 'textarea',
|
885 |
'section' => 'mtype',
|
886 |
+
'default' => self::get_default_value( $key . '_body' ),
|
887 |
'original' => '',
|
888 |
'transport' => 'refresh',
|
889 |
'active_callback' => array(
|
898 |
/* CONTAINER STUFF */
|
899 |
// Email width.
|
900 |
'content_width' => array(
|
901 |
+
'title' => __( 'Content Width', 'kadence-woocommerce-email-designer' ),
|
902 |
+
'control_type' => 'rangevalue',
|
903 |
+
'section' => 'container',
|
904 |
+
'default' => self::get_default_value( 'content_width' ),
|
905 |
+
'live_method' => 'css',
|
906 |
+
'selectors' => array(
|
907 |
+
'#template_container' => array( 'width' ),
|
908 |
+
'#template_header' => array( 'width' ),
|
909 |
+
'#template_header_image' => array( 'width' ),
|
910 |
+
'#template_body' => array( 'width' ),
|
911 |
+
'#template_footer' => array( 'width' ),
|
912 |
+
),
|
913 |
+
'input_attrs' => array(
|
914 |
+
'step' => 2,
|
915 |
+
'min' => 350,
|
916 |
+
'max' => 1500,
|
917 |
+
),
|
918 |
+
),
|
919 |
+
'responsive_mode' => array(
|
920 |
+
'title' => __( 'Enable Fluid Width', 'kadence-woocommerce-email-designer' ),
|
921 |
+
'control_type' => 'toggleswitch',
|
922 |
+
'section' => 'container',
|
923 |
+
'transport' => 'refresh',
|
924 |
+
'default' => self::get_default_value( 'responsive_mode' ),
|
925 |
+
),
|
926 |
+
'content_inner_width' => array(
|
927 |
+
'title' => __( 'Content Inner Max Width', 'kadence-woocommerce-email-designer' ),
|
928 |
'control_type' => 'rangevalue',
|
929 |
'section' => 'container',
|
930 |
+
'default' => self::get_default_value( 'content_width' ),
|
931 |
'live_method' => 'css',
|
932 |
'selectors' => array(
|
933 |
+
'#template_container #template_header' => array( 'max-width' ),
|
934 |
+
'#template_container #template_header_image' => array( 'max-width' ),
|
935 |
+
'#template_container #template_body' => array( 'max-width' ),
|
936 |
+
'#template_container #template_footer' => array( 'max-width' ),
|
|
|
937 |
),
|
938 |
'input_attrs' => array(
|
939 |
'step' => 2,
|
940 |
'min' => 350,
|
941 |
'max' => 1500,
|
942 |
),
|
943 |
+
'active_callback' => array(
|
944 |
+
'id' => 'responsive_mode',
|
945 |
+
'compare' => '==',
|
946 |
+
'value' => true,
|
947 |
+
),
|
948 |
),
|
949 |
// Border radius
|
950 |
'border_radius' => array(
|
951 |
+
'title' => __( 'Border radius', 'kadence-woocommerce-email-designer' ),
|
952 |
'control_type' => 'rangevalue',
|
953 |
'section' => 'container',
|
954 |
+
'default' => self::get_default_value( 'border_radius' ),
|
955 |
'live_method' => 'css',
|
956 |
+
'description' => __( 'Warning: most desktop email clients do not yet support this.', 'kadence-woocommerce-email-designer' ),
|
957 |
'selectors' => array(
|
958 |
+
'#template_container' => array( 'border-radius' ),
|
959 |
),
|
960 |
'input_attrs' => array(
|
961 |
'step' => 1,
|
963 |
'max' => 100,
|
964 |
),
|
965 |
),
|
966 |
+
// Border Width.
|
967 |
'border_width' => array(
|
968 |
+
'title' => __( 'Border Top Width', 'kadence-woocommerce-email-designer' ),
|
969 |
+
'control_type' => 'rangevalue',
|
970 |
+
'section' => 'container',
|
971 |
+
'default' => self::get_default_value( 'border_width' ),
|
972 |
+
'live_method' => 'css',
|
973 |
+
'selectors' => array(
|
974 |
+
'body #template_container' => array( 'border-top-width' ),
|
975 |
+
),
|
976 |
+
'input_attrs' => array(
|
977 |
+
'step' => 1,
|
978 |
+
'min' => 0,
|
979 |
+
'max' => 20,
|
980 |
+
),
|
981 |
+
),
|
982 |
+
// Border Width.
|
983 |
+
'border_width_right' => array(
|
984 |
+
'title' => __( 'Border Right Width', 'kadence-woocommerce-email-designer' ),
|
985 |
+
'control_type' => 'rangevalue',
|
986 |
+
'section' => 'container',
|
987 |
+
'default' => str_replace( 'px', '', Kadence_Woomail_Customizer::opt( 'border_width' ) ),
|
988 |
+
'live_method' => 'css',
|
989 |
+
'selectors' => array(
|
990 |
+
'body #template_container' => array( 'border-right-width' ),
|
991 |
+
),
|
992 |
+
'input_attrs' => array(
|
993 |
+
'step' => 1,
|
994 |
+
'min' => 0,
|
995 |
+
'max' => 20,
|
996 |
+
),
|
997 |
+
),
|
998 |
+
// Border Width.
|
999 |
+
'border_width_bottom' => array(
|
1000 |
+
'title' => __( 'Border Bottom Width', 'kadence-woocommerce-email-designer' ),
|
1001 |
+
'control_type' => 'rangevalue',
|
1002 |
+
'section' => 'container',
|
1003 |
+
'default' => str_replace( 'px', '', Kadence_Woomail_Customizer::opt( 'border_width' ) ),
|
1004 |
+
'live_method' => 'css',
|
1005 |
+
'selectors' => array(
|
1006 |
+
'body #template_container' => array( 'border-bottom-width' ),
|
1007 |
+
),
|
1008 |
+
'input_attrs' => array(
|
1009 |
+
'step' => 1,
|
1010 |
+
'min' => 0,
|
1011 |
+
'max' => 20,
|
1012 |
+
),
|
1013 |
+
),
|
1014 |
+
// Border Width.
|
1015 |
+
'border_width_left' => array(
|
1016 |
+
'title' => __( 'Border Left Width', 'kadence-woocommerce-email-designer' ),
|
1017 |
'control_type' => 'rangevalue',
|
1018 |
'section' => 'container',
|
1019 |
+
'default' => str_replace( 'px', '', Kadence_Woomail_Customizer::opt( 'border_width' ) ),
|
1020 |
'live_method' => 'css',
|
1021 |
'selectors' => array(
|
1022 |
+
'body #template_container' => array( 'border-left-width' ),
|
1023 |
),
|
1024 |
'input_attrs' => array(
|
1025 |
'step' => 1,
|
1027 |
'max' => 20,
|
1028 |
),
|
1029 |
),
|
1030 |
+
// Border Color.
|
1031 |
'border_color' => array(
|
1032 |
+
'title' => __( 'Border color', 'kadence-woocommerce-email-designer' ),
|
1033 |
'section' => 'container',
|
1034 |
'control_type' => 'color',
|
1035 |
+
'default' => self::get_default_value( 'border_color' ),
|
1036 |
'live_method' => 'css',
|
1037 |
'selectors' => array(
|
1038 |
+
'body #template_container' => array( 'border-color' ),
|
1039 |
),
|
1040 |
),
|
1041 |
// Shadow
|
1042 |
'shadow' => array(
|
1043 |
+
'title' => __( 'Shadow', 'kadence-woocommerce-email-designer' ),
|
1044 |
'control_type' => 'rangevalue',
|
1045 |
'section' => 'container',
|
1046 |
+
'description' => __( 'Warning: most email clients do not yet support this.', 'kadence-woocommerce-email-designer' ),
|
1047 |
+
'default' => self::get_default_value( 'shadow' ),
|
1048 |
'live_method' => 'css',
|
1049 |
'selectors' => array(
|
1050 |
+
'body #template_container' => array( 'box-shadow' ),
|
1051 |
),
|
1052 |
'input_attrs' => array(
|
1053 |
'step' => 1,
|
1057 |
),
|
1058 |
// Email Top Padding
|
1059 |
'email_padding' => array(
|
1060 |
+
'title' => __( 'Container Top Padding', 'kadence-woocommerce-email-designer' ),
|
1061 |
'control_type' => 'rangevalue',
|
1062 |
'section' => 'container',
|
1063 |
+
'default' => self::get_default_value( 'email_padding' ),
|
1064 |
'live_method' => 'css',
|
1065 |
'selectors' => array(
|
1066 |
+
'#wrapper' => array( 'padding-top' ),
|
1067 |
),
|
1068 |
'input_attrs' => array(
|
1069 |
'step' => 1,
|
1073 |
),
|
1074 |
// Email Top Padding
|
1075 |
'email_padding_bottom' => array(
|
1076 |
+
'title' => __( 'Container Botom Padding', 'kadence-woocommerce-email-designer' ),
|
1077 |
'control_type' => 'rangevalue',
|
1078 |
'section' => 'container',
|
1079 |
+
'default' => self::get_default_value( 'email_padding' ),
|
1080 |
'live_method' => 'css',
|
1081 |
'selectors' => array(
|
1082 |
+
'#wrapper' => array( 'padding-bottom' ),
|
1083 |
),
|
1084 |
'input_attrs' => array(
|
1085 |
'step' => 1,
|
1087 |
'max' => 250,
|
1088 |
),
|
1089 |
),
|
1090 |
+
/**
|
1091 |
+
* HEADER IMAGE OPTIONS
|
1092 |
+
*/
|
1093 |
+
// Header Image Width.
|
1094 |
+
'header_image_placement' => array(
|
1095 |
+
'title' => __( 'Header Image Placement', 'kadence-woocommerce-email-designer' ),
|
1096 |
+
'section' => 'header_image',
|
1097 |
+
'default' => self::get_default_value( 'header_image_placement' ),
|
1098 |
+
'transport' => 'refresh',
|
1099 |
+
'type' => 'select',
|
1100 |
+
'choices' => array(
|
1101 |
+
'outside' => __( 'Outside Body Container', 'kadence-woocommerce-email-designer' ),
|
1102 |
+
'inside' => __( 'Inside Body Container', 'kadence-woocommerce-email-designer' ),
|
1103 |
+
),
|
1104 |
+
),
|
1105 |
+
// Image Align.
|
1106 |
'header_image_align' => array(
|
1107 |
+
'title' => __( 'Image Align', 'kadence-woocommerce-email-designer' ),
|
1108 |
'section' => 'header_image',
|
1109 |
+
'default' => self::get_default_value( 'header_image_align' ),
|
1110 |
'live_method' => 'css',
|
1111 |
'type' => 'select',
|
1112 |
'choices' => self::get_image_aligns(),
|
1113 |
'selectors' => array(
|
1114 |
+
'#template_header_image_table td' => array( 'text-align' ),
|
1115 |
),
|
1116 |
),
|
1117 |
// Image Maxwidth
|
1118 |
'header_image_maxwidth' => array(
|
1119 |
+
'title' => __( 'Image Max Width', 'kadence-woocommerce-email-designer' ),
|
1120 |
'section' => 'header_image',
|
1121 |
+
'default' => self::get_default_value( 'header_image_maxwidth' ),
|
1122 |
'live_method' => 'css',
|
1123 |
'control_type' => 'rangevalue',
|
1124 |
'selectors' => array(
|
1125 |
+
'#template_header_image img' => array( 'max-width' ),
|
1126 |
),
|
1127 |
'input_attrs' => array(
|
1128 |
'step' => 1,
|
1131 |
),
|
1132 |
),
|
1133 |
'header_image_background_color' => array(
|
1134 |
+
'title' => __( 'Background color', 'kadence-woocommerce-email-designer' ),
|
1135 |
'section' => 'header_image',
|
1136 |
'control_type' => 'color',
|
1137 |
+
'default' => self::get_default_value( 'header_image_background_color' ),
|
1138 |
'live_method' => 'css',
|
1139 |
'selectors' => array(
|
1140 |
+
'#template_header_image_container' => array( 'background-color' ),
|
1141 |
),
|
1142 |
),
|
1143 |
+
// Header Padding top/bottom.
|
1144 |
'header_image_padding_top_bottom' => array(
|
1145 |
+
'title' => __( 'Padding top/bottom', 'kadence-woocommerce-email-designer' ),
|
1146 |
'control_type' => 'rangevalue',
|
1147 |
'section' => 'header_image',
|
1148 |
+
'default' => self::get_default_value( 'header_image_padding_top_bottom' ),
|
1149 |
'live_method' => 'css',
|
1150 |
'selectors' => array(
|
1151 |
+
'#template_header_image_table td' => array( 'padding-top', 'padding-bottom' ),
|
1152 |
),
|
1153 |
'input_attrs' => array(
|
1154 |
'step' => 1,
|
1156 |
'max' => 150,
|
1157 |
),
|
1158 |
),
|
1159 |
+
// Header background color.
|
1160 |
'header_background_color' => array(
|
1161 |
+
'title' => __( 'Background color', 'kadence-woocommerce-email-designer' ),
|
1162 |
'section' => 'header_style',
|
1163 |
'control_type' => 'color',
|
1164 |
+
'default' => self::get_default_value( 'header_background_color' ),
|
1165 |
'live_method' => 'css',
|
1166 |
'selectors' => array(
|
1167 |
+
'#template_header' => array( 'background-color' ),
|
1168 |
),
|
1169 |
),
|
1170 |
// Header Text align
|
1171 |
'header_text_align' => array(
|
1172 |
+
'title' => __( 'Text align', 'kadence-woocommerce-email-designer' ),
|
1173 |
'section' => 'header_style',
|
1174 |
+
'default' => self::get_default_value( 'header_text_align' ),
|
1175 |
'live_method' => 'css',
|
1176 |
'type' => 'select',
|
1177 |
'choices' => self::get_text_aligns(),
|
1178 |
'selectors' => array(
|
1179 |
+
'#header_wrapper h1' => array( 'text-align' ),
|
1180 |
+
'#header_wrapper' => array( 'text-align' ),
|
1181 |
),
|
1182 |
),
|
1183 |
|
1184 |
+
// Header Padding top/bottom.
|
1185 |
'header_padding_top' => array(
|
1186 |
+
'title' => __( 'Padding Top', 'kadence-woocommerce-email-designer' ),
|
1187 |
'control_type' => 'rangevalue',
|
1188 |
'section' => 'header_style',
|
1189 |
+
'default' => self::get_default_value( 'header_padding_top_bottom' ),
|
1190 |
'live_method' => 'css',
|
1191 |
'selectors' => array(
|
1192 |
+
'#header_wrapper' => array( 'padding-top' ),
|
1193 |
),
|
1194 |
'input_attrs' => array(
|
1195 |
'step' => 1,
|
1199 |
),
|
1200 |
// Header Padding top/bottom
|
1201 |
'header_padding_bottom' => array(
|
1202 |
+
'title' => __( 'Padding Bottom', 'kadence-woocommerce-email-designer' ),
|
1203 |
'control_type' => 'rangevalue',
|
1204 |
'section' => 'header_style',
|
1205 |
+
'default' => self::get_default_value( 'header_padding_top_bottom' ),
|
1206 |
'live_method' => 'css',
|
1207 |
'selectors' => array(
|
1208 |
+
'#header_wrapper' => array( 'padding-bottom' ),
|
1209 |
),
|
1210 |
'input_attrs' => array(
|
1211 |
'step' => 1,
|
1216 |
|
1217 |
// Header Padding left/right
|
1218 |
'header_padding_left_right' => array(
|
1219 |
+
'title' => __( 'Padding left/right', 'kadence-woocommerce-email-designer' ),
|
1220 |
'control_type' => 'rangevalue',
|
1221 |
'section' => 'header_style',
|
1222 |
+
'default' => self::get_default_value( 'header_padding_left_right' ),
|
1223 |
'live_method' => 'css',
|
1224 |
'selectors' => array(
|
1225 |
+
'#header_wrapper' => array( 'padding-left', 'padding-right' ),
|
1226 |
),
|
1227 |
'input_attrs' => array(
|
1228 |
'step' => 1,
|
1232 |
),
|
1233 |
// Heading Font size
|
1234 |
'heading_font_size' => array(
|
1235 |
+
'title' => __( 'Heading Font size', 'kadence-woocommerce-email-designer' ),
|
1236 |
'control_type' => 'rangevalue',
|
1237 |
'section' => 'heading',
|
1238 |
+
'default' => self::get_default_value( 'heading_font_size' ),
|
1239 |
'live_method' => 'css',
|
1240 |
'selectors' => array(
|
1241 |
+
'#template_header h1' => array( 'font-size' ),
|
1242 |
),
|
1243 |
'input_attrs' => array(
|
1244 |
'step' => 1,
|
1248 |
),
|
1249 |
// heading Line Height
|
1250 |
'heading_line_height' => array(
|
1251 |
+
'title' => __( 'Heading Line Height', 'kadence-woocommerce-email-designer' ),
|
1252 |
'control_type' => 'rangevalue',
|
1253 |
'section' => 'heading',
|
1254 |
+
'default' => self::get_default_value( 'heading_line_height' ),
|
1255 |
'live_method' => 'css',
|
1256 |
'selectors' => array(
|
1257 |
+
'#template_header h1' => array( 'line-height' ),
|
1258 |
),
|
1259 |
'input_attrs' => array(
|
1260 |
'step' => 1,
|
1264 |
),
|
1265 |
// Heading Font family
|
1266 |
'heading_font_family' => array(
|
1267 |
+
'title' => __( 'Heading Font family', 'kadence-woocommerce-email-designer' ),
|
1268 |
'section' => 'heading',
|
1269 |
+
'default' => self::get_default_value( 'heading_font_family' ),
|
1270 |
'live_method' => 'css',
|
1271 |
'type' => 'select',
|
1272 |
'choices' => self::get_font_families(),
|
1273 |
'selectors' => array(
|
1274 |
+
'#template_header h1' => array( 'font-family' ),
|
1275 |
),
|
1276 |
),
|
1277 |
// Heading Font style
|
1278 |
'heading_font_style' => array(
|
1279 |
+
'title' => __( 'Heading Font Style', 'kadence-woocommerce-email-designer' ),
|
1280 |
'section' => 'heading',
|
1281 |
+
'default' => self::get_default_value( 'heading_font_style' ),
|
1282 |
'live_method' => 'css',
|
1283 |
'type' => 'select',
|
1284 |
'choices' => array(
|
1285 |
+
'normal' => __( 'Normal', 'kadence-woocommerce-email-designer' ),
|
1286 |
+
'italic' => __( 'Italic', 'kadence-woocommerce-email-designer' ),
|
1287 |
),
|
1288 |
'selectors' => array(
|
1289 |
+
'#template_header h1' => array( 'font-style' ),
|
1290 |
),
|
1291 |
),
|
1292 |
// Heading Font weight
|
1293 |
'heading_font_weight' => array(
|
1294 |
+
'title' => __( 'Heading Font weight', 'kadence-woocommerce-email-designer' ),
|
1295 |
'control_type' => 'rangevalue',
|
1296 |
'section' => 'heading',
|
1297 |
+
'default' => self::get_default_value( 'heading_font_weight' ),
|
1298 |
'live_method' => 'css',
|
1299 |
'selectors' => array(
|
1300 |
+
'#template_header h1' => array( 'font-weight' ),
|
1301 |
),
|
1302 |
'input_attrs' => array(
|
1303 |
'step' => 100,
|
1307 |
),
|
1308 |
// Heading Color
|
1309 |
'heading_color' => array(
|
1310 |
+
'title' => __( 'Heading Text color', 'kadence-woocommerce-email-designer' ),
|
1311 |
'section' => 'heading',
|
1312 |
'control_type' => 'color',
|
1313 |
+
'default' => self::get_default_value( 'heading_color' ),
|
1314 |
'live_method' => 'css',
|
1315 |
'selectors' => array(
|
1316 |
+
'#template_header' => array( 'color' ),
|
1317 |
+
'#template_header h1' => array( 'color' ),
|
1318 |
),
|
1319 |
),
|
1320 |
//Subtitle Info
|
1321 |
'subtitle_fontt_info' => array(
|
1322 |
+
'title' => __( 'Subtitle Settings', 'kadence-woocommerce-email-designer' ),
|
1323 |
'section' => 'heading',
|
1324 |
'control_type' => 'kwdinfoblock',
|
1325 |
'description' => '',
|
1326 |
),
|
1327 |
// Subtitle placement
|
1328 |
'subtitle_placement' => array(
|
1329 |
+
'title' => __( 'Subtitle Placement', 'kadence-woocommerce-email-designer' ),
|
1330 |
'section' => 'heading',
|
1331 |
+
'default' => self::get_default_value( 'subtitle_placement' ),
|
1332 |
'transport' => 'refresh',
|
1333 |
'type' => 'select',
|
1334 |
'choices' => array(
|
1335 |
+
'below' => __( 'Below Heading', 'kadence-woocommerce-email-designer' ),
|
1336 |
+
'above' => __( 'Above Heading', 'kadence-woocommerce-email-designer' ),
|
1337 |
),
|
1338 |
),
|
1339 |
|
1340 |
// Subtitle Font size
|
1341 |
'subtitle_font_size' => array(
|
1342 |
+
'title' => __( 'Subtitle Font Size', 'kadence-woocommerce-email-designer' ),
|
1343 |
'control_type' => 'rangevalue',
|
1344 |
'section' => 'heading',
|
1345 |
+
'default' => self::get_default_value( 'subtitle_font_size' ),
|
1346 |
'live_method' => 'css',
|
1347 |
'selectors' => array(
|
1348 |
+
'#template_header .subtitle' => array( 'font-size' ),
|
1349 |
),
|
1350 |
'input_attrs' => array(
|
1351 |
'step' => 1,
|
1355 |
),
|
1356 |
// Subtitle Line Height
|
1357 |
'subtitle_line_height' => array(
|
1358 |
+
'title' => __( 'Subtitle Line Height', 'kadence-woocommerce-email-designer' ),
|
1359 |
'control_type' => 'rangevalue',
|
1360 |
'section' => 'heading',
|
1361 |
+
'default' => self::get_default_value( 'subtitle_line_height' ),
|
1362 |
'live_method' => 'css',
|
1363 |
'selectors' => array(
|
1364 |
+
'#template_header .subtitle' => array( 'line-height' ),
|
1365 |
),
|
1366 |
'input_attrs' => array(
|
1367 |
'step' => 1,
|
1369 |
'max' => 125,
|
1370 |
),
|
1371 |
),
|
1372 |
+
// Subtitle Font family.
|
1373 |
'subtitle_font_family' => array(
|
1374 |
+
'title' => __( 'Subtitle Font Family', 'kadence-woocommerce-email-designer' ),
|
1375 |
'section' => 'heading',
|
1376 |
+
'default' => self::get_default_value( 'subtitle_font_family' ),
|
1377 |
'live_method' => 'css',
|
1378 |
'type' => 'select',
|
1379 |
'choices' => self::get_font_families(),
|
1380 |
'selectors' => array(
|
1381 |
+
'#template_header .subtitle' => array( 'font-family' ),
|
1382 |
),
|
1383 |
),
|
1384 |
// Subtitle Font style
|
1385 |
'subtitle_font_style' => array(
|
1386 |
+
'title' => __( 'Subtitle Font Style', 'kadence-woocommerce-email-designer' ),
|
1387 |
'section' => 'heading',
|
1388 |
+
'default' => self::get_default_value( 'subtitle_font_style' ),
|
1389 |
'live_method' => 'css',
|
1390 |
'type' => 'select',
|
1391 |
'choices' => array(
|
1392 |
+
'normal' => __( 'Normal', 'kadence-woocommerce-email-designer' ),
|
1393 |
+
'italic' => __( 'Italic', 'kadence-woocommerce-email-designer' ),
|
1394 |
),
|
1395 |
'selectors' => array(
|
1396 |
+
'#template_header .subtitle' => array( 'font-style' ),
|
1397 |
),
|
1398 |
),
|
1399 |
|
1400 |
// Subtitle Font weight
|
1401 |
'subtitle_font_weight' => array(
|
1402 |
+
'title' => __( 'Subtitle Font weight', 'kadence-woocommerce-email-designer' ),
|
1403 |
'control_type' => 'rangevalue',
|
1404 |
'section' => 'heading',
|
1405 |
+
'default' => self::get_default_value( 'subtitle_font_weight' ),
|
1406 |
'live_method' => 'css',
|
1407 |
'selectors' => array(
|
1408 |
+
'#template_header .subtitle' => array( 'font-weight' ),
|
1409 |
),
|
1410 |
'input_attrs' => array(
|
1411 |
'step' => 100,
|
1416 |
|
1417 |
// Subtitle Color
|
1418 |
'subtitle_color' => array(
|
1419 |
+
'title' => __( 'Subtitle Text color', 'kadence-woocommerce-email-designer' ),
|
1420 |
'section' => 'heading',
|
1421 |
'control_type' => 'color',
|
1422 |
+
'default' => self::get_default_value( 'subtitle_color' ),
|
1423 |
'live_method' => 'css',
|
1424 |
'selectors' => array(
|
1425 |
+
'#template_header .subtitle' => array( 'color' ),
|
1426 |
),
|
1427 |
),
|
1428 |
|
1429 |
// Content padding top
|
1430 |
'content_padding_top' => array(
|
1431 |
+
'title' => __( 'Padding Top', 'kadence-woocommerce-email-designer' ),
|
1432 |
'control_type' => 'rangevalue',
|
1433 |
'section' => 'content_container',
|
1434 |
+
'default' => self::get_default_value( 'content_padding' ),
|
1435 |
'live_method' => 'css',
|
1436 |
'selectors' => array(
|
1437 |
+
'#body_content' => array( 'padding-top' ),
|
1438 |
),
|
1439 |
'input_attrs' => array(
|
1440 |
'step' => 1,
|
1444 |
),
|
1445 |
// Content padding
|
1446 |
'content_padding_bottom' => array(
|
1447 |
+
'title' => __( 'Padding Bottom', 'kadence-woocommerce-email-designer' ),
|
1448 |
'control_type' => 'rangevalue',
|
1449 |
'section' => 'content_container',
|
1450 |
+
'default' => self::get_default_value( 'content_padding_bottom' ),
|
1451 |
'live_method' => 'css',
|
1452 |
'selectors' => array(
|
1453 |
+
'#body_content' => array( 'padding-bottom' ),
|
1454 |
),
|
1455 |
'input_attrs' => array(
|
1456 |
'step' => 1,
|
1460 |
),
|
1461 |
// Content padding
|
1462 |
'content_padding' => array(
|
1463 |
+
'title' => __( 'Padding Left/Right', 'kadence-woocommerce-email-designer' ),
|
1464 |
'control_type' => 'rangevalue',
|
1465 |
'section' => 'content_container',
|
1466 |
+
'default' => self::get_default_value( 'content_padding' ),
|
1467 |
'live_method' => 'css',
|
1468 |
'selectors' => array(
|
1469 |
+
'#body_content > table > tbody > tr > td' => array( 'padding-left', 'padding-right' ),
|
1470 |
+
'#body_content > table > tr > td' => array( 'padding-left', 'padding-right' ),
|
1471 |
),
|
1472 |
'input_attrs' => array(
|
1473 |
'step' => 1,
|
1478 |
// TEXT STYLE
|
1479 |
// Font size
|
1480 |
'font_size' => array(
|
1481 |
+
'title' => __( 'Font Size', 'kadence-woocommerce-email-designer' ),
|
1482 |
'control_type' => 'rangevalue',
|
1483 |
'section' => 'text_style',
|
1484 |
+
'default' => self::get_default_value( 'font_size' ),
|
1485 |
'live_method' => 'css',
|
1486 |
'selectors' => array(
|
1487 |
+
'#body_content_inner' => array( 'font-size' ),
|
1488 |
+
'img' => array( 'font-size' ),
|
1489 |
),
|
1490 |
'input_attrs' => array(
|
1491 |
'step' => 1,
|
1495 |
),
|
1496 |
// Line Height
|
1497 |
'line_height' => array(
|
1498 |
+
'title' => __( 'Line Height', 'kadence-woocommerce-email-designer' ),
|
1499 |
'control_type' => 'rangevalue',
|
1500 |
'section' => 'text_style',
|
1501 |
+
'default' => self::get_default_value( 'line_height' ),
|
1502 |
'live_method' => 'css',
|
1503 |
'selectors' => array(
|
1504 |
+
'#body_content_inner' => array( 'line-height' ),
|
1505 |
+
'img' => array( 'line-height' ),
|
1506 |
),
|
1507 |
'input_attrs' => array(
|
1508 |
'step' => 1,
|
1512 |
),
|
1513 |
// Font family
|
1514 |
'font_family' => array(
|
1515 |
+
'title' => __( 'Font Family', 'kadence-woocommerce-email-designer' ),
|
1516 |
'section' => 'text_style',
|
1517 |
+
'default' => self::get_default_value( 'font_family' ),
|
1518 |
'live_method' => 'css',
|
1519 |
'type' => 'select',
|
1520 |
'choices' => self::get_font_families(),
|
1526 |
),
|
1527 |
// Font weight
|
1528 |
'font_weight' => array(
|
1529 |
+
'title' => __( 'Font weight', 'kadence-woocommerce-email-designer' ),
|
1530 |
'control_type' => 'rangevalue',
|
1531 |
'section' => 'text_style',
|
1532 |
+
'default' => self::get_default_value( 'font_weight' ),
|
1533 |
'live_method' => 'css',
|
1534 |
'selectors' => array(
|
1535 |
+
'#body_content_inner' => array( 'font-weight' ),
|
1536 |
),
|
1537 |
'input_attrs' => array(
|
1538 |
'step' => 100,
|
1542 |
),
|
1543 |
// Link color
|
1544 |
'link_color' => array(
|
1545 |
+
'title' => __( 'Link Color', 'kadence-woocommerce-email-designer' ),
|
1546 |
'section' => 'text_style',
|
1547 |
'control_type' => 'color',
|
1548 |
+
'default' => self::get_default_value( 'link_color' ),
|
1549 |
'live_method' => 'css',
|
1550 |
'selectors' => array(
|
1551 |
+
'a' => array( 'color' ),
|
1552 |
+
'.link' => array( 'color' ),
|
1553 |
+
'.btn' => array( 'background-color' ),
|
1554 |
),
|
1555 |
),
|
1556 |
// H2 TEXT STYLE
|
1557 |
// Font size
|
1558 |
'h2_font_size' => array(
|
1559 |
+
'title' => __( 'H2 Font Size', 'kadence-woocommerce-email-designer' ),
|
1560 |
'control_type' => 'rangevalue',
|
1561 |
'section' => 'headings_style',
|
1562 |
+
'default' => self::get_default_value( 'h2_font_size' ),
|
1563 |
'live_method' => 'css',
|
1564 |
'selectors' => array(
|
1565 |
+
'#template_body h2' => array( 'font-size' ),
|
1566 |
),
|
1567 |
'input_attrs' => array(
|
1568 |
'step' => 1,
|
1572 |
),
|
1573 |
// h2 Line Height
|
1574 |
'h2_line_height' => array(
|
1575 |
+
'title' => __( 'H2 Line Height', 'kadence-woocommerce-email-designer' ),
|
1576 |
'control_type' => 'rangevalue',
|
1577 |
'section' => 'headings_style',
|
1578 |
+
'default' => self::get_default_value( 'h2_line_height' ),
|
1579 |
'live_method' => 'css',
|
1580 |
'selectors' => array(
|
1581 |
+
'#template_body h2' => array( 'line-height' ),
|
1582 |
),
|
1583 |
'input_attrs' => array(
|
1584 |
'step' => 1,
|
1588 |
),
|
1589 |
// h2 padding top
|
1590 |
'h2_padding_top' => array(
|
1591 |
+
'title' => __( 'H2 Padding Top', 'kadence-woocommerce-email-designer' ),
|
1592 |
'control_type' => 'rangevalue',
|
1593 |
'section' => 'headings_style',
|
1594 |
+
'default' => self::get_default_value( 'h2_padding_top' ),
|
1595 |
'live_method' => 'css',
|
1596 |
'selectors' => array(
|
1597 |
+
'#template_body h2' => array( 'padding-top' ),
|
1598 |
),
|
1599 |
'input_attrs' => array(
|
1600 |
'step' => 1,
|
1604 |
),
|
1605 |
// h2 padding bottom
|
1606 |
'h2_padding_bottom' => array(
|
1607 |
+
'title' => __( 'H2 Padding Bottom', 'kadence-woocommerce-email-designer' ),
|
1608 |
'control_type' => 'rangevalue',
|
1609 |
'section' => 'headings_style',
|
1610 |
+
'default' => self::get_default_value( 'h2_padding_bottom' ),
|
1611 |
'live_method' => 'css',
|
1612 |
'selectors' => array(
|
1613 |
+
'#template_body h2' => array( 'padding-bottom' ),
|
1614 |
),
|
1615 |
'input_attrs' => array(
|
1616 |
'step' => 1,
|
1620 |
),
|
1621 |
// h2 margin top
|
1622 |
'h2_margin_top' => array(
|
1623 |
+
'title' => __( 'H2 Margin Top', 'kadence-woocommerce-email-designer' ),
|
1624 |
'control_type' => 'rangevalue',
|
1625 |
'section' => 'headings_style',
|
1626 |
+
'default' => self::get_default_value( 'h2_margin_top' ),
|
1627 |
'live_method' => 'css',
|
1628 |
'selectors' => array(
|
1629 |
+
'#template_body h2' => array( 'margin-top' ),
|
1630 |
),
|
1631 |
'input_attrs' => array(
|
1632 |
'step' => 1,
|
1636 |
),
|
1637 |
// h2 margin bottom
|
1638 |
'h2_margin_bottom' => array(
|
1639 |
+
'title' => __( 'H2 Margin Bottom', 'kadence-woocommerce-email-designer' ),
|
1640 |
'control_type' => 'rangevalue',
|
1641 |
'section' => 'headings_style',
|
1642 |
+
'default' => self::get_default_value( 'h2_margin_bottom' ),
|
1643 |
'live_method' => 'css',
|
1644 |
'selectors' => array(
|
1645 |
+
'#template_body h2' => array( 'margin-bottom' ),
|
1646 |
),
|
1647 |
'input_attrs' => array(
|
1648 |
'step' => 1,
|
1652 |
),
|
1653 |
// h2 Font family
|
1654 |
'h2_font_family' => array(
|
1655 |
+
'title' => __( 'H2 Font Family', 'kadence-woocommerce-email-designer' ),
|
1656 |
'section' => 'headings_style',
|
1657 |
+
'default' => self::get_default_value( 'h2_font_family' ),
|
1658 |
'live_method' => 'css',
|
1659 |
'type' => 'select',
|
1660 |
'choices' => self::get_font_families(),
|
1661 |
'selectors' => array(
|
1662 |
+
'#template_body h2' => array( 'font-family' ),
|
1663 |
+
'#template_body h2 a' => array( 'font-family' ),
|
1664 |
),
|
1665 |
),
|
1666 |
// h2 Font style
|
1667 |
'h2_font_style' => array(
|
1668 |
+
'title' => __( 'H2 Font Style', 'kadence-woocommerce-email-designer' ),
|
1669 |
'section' => 'headings_style',
|
1670 |
+
'default' => self::get_default_value( 'h2_font_style' ),
|
1671 |
'live_method' => 'css',
|
1672 |
'type' => 'select',
|
1673 |
'choices' => array(
|
1674 |
+
'normal' => __( 'Normal', 'kadence-woocommerce-email-designer' ),
|
1675 |
+
'italic' => __( 'Italic', 'kadence-woocommerce-email-designer' ),
|
1676 |
),
|
1677 |
'selectors' => array(
|
1678 |
+
'#template_body h2' => array( 'font-style' ),
|
1679 |
+
'#template_body h2 a' => array( 'font-style' ),
|
1680 |
),
|
1681 |
),
|
1682 |
// h2 Font weight
|
1683 |
'h2_font_weight' => array(
|
1684 |
+
'title' => __( 'H2 Font weight', 'kadence-woocommerce-email-designer' ),
|
1685 |
'control_type' => 'rangevalue',
|
1686 |
'section' => 'headings_style',
|
1687 |
+
'default' => self::get_default_value( 'h2_font_weight' ),
|
1688 |
'live_method' => 'css',
|
1689 |
'selectors' => array(
|
1690 |
+
'#template_body h2' => array( 'font-weight' ),
|
1691 |
+
'#template_body h2 a' => array( 'font-weight' ),
|
1692 |
),
|
1693 |
'input_attrs' => array(
|
1694 |
'step' => 100,
|
1698 |
),
|
1699 |
// h2 text transform
|
1700 |
'h2_text_transform' => array(
|
1701 |
+
'title' => __( 'H2 Text Transform', 'kadence-woocommerce-email-designer' ),
|
1702 |
'section' => 'headings_style',
|
1703 |
+
'default' => self::get_default_value( 'h2_text_transform' ),
|
1704 |
'live_method' => 'css',
|
1705 |
'type' => 'select',
|
1706 |
'choices' => array(
|
1707 |
+
'none' => __( 'None', 'kadence-woocommerce-email-designer' ),
|
1708 |
+
'uppercase' => __( 'Uppercase', 'kadence-woocommerce-email-designer' ),
|
1709 |
+
'lowercase' => __( 'Lowercase', 'kadence-woocommerce-email-designer' ),
|
1710 |
+
'capitalize' => __( 'Capitalize', 'kadence-woocommerce-email-designer' ),
|
1711 |
),
|
1712 |
'selectors' => array(
|
1713 |
+
'#template_body h2' => array( 'text-transform' ),
|
1714 |
),
|
1715 |
),
|
1716 |
// H2 color
|
1717 |
'h2_color' => array(
|
1718 |
+
'title' => __( 'H2 Color', 'kadence-woocommerce-email-designer' ),
|
1719 |
'section' => 'headings_style',
|
1720 |
'control_type' => 'color',
|
1721 |
+
'default' => self::get_default_value( 'h2_color' ),
|
1722 |
'live_method' => 'css',
|
1723 |
'selectors' => array(
|
1724 |
+
'#template_body h2' => array( 'color' ),
|
1725 |
+
'#template_body h2 a' => array( 'color' ),
|
1726 |
),
|
1727 |
),
|
1728 |
// h2 text align
|
1729 |
'h2_text_align' => array(
|
1730 |
+
'title' => __( 'H2 Text Align', 'kadence-woocommerce-email-designer' ),
|
1731 |
'section' => 'headings_style',
|
1732 |
+
'default' => self::get_default_value( 'h2_text_align' ),
|
1733 |
'live_method' => 'css',
|
1734 |
'type' => 'select',
|
1735 |
'choices' => self::get_text_aligns(),
|
1736 |
'selectors' => array(
|
1737 |
+
'#template_body h2' => array( 'text-align' ),
|
1738 |
),
|
1739 |
),
|
1740 |
// h2 style
|
1741 |
'h2_style' => array(
|
1742 |
+
'title' => __( 'H2 Separator', 'kadence-woocommerce-email-designer' ),
|
1743 |
'section' => 'headings_style',
|
1744 |
+
'default' => self::get_default_value( 'h2_style' ),
|
1745 |
'transport' => 'refresh',
|
1746 |
'type' => 'select',
|
1747 |
'choices' => array(
|
1748 |
+
'none' => __( 'None', 'kadence-woocommerce-email-designer' ),
|
1749 |
+
'below' => __( 'Separator below', 'kadence-woocommerce-email-designer' ),
|
1750 |
+
'above' => __( 'Separator above', 'kadence-woocommerce-email-designer' ),
|
1751 |
),
|
1752 |
),
|
1753 |
// separator height
|
1754 |
'h2_separator_height' => array(
|
1755 |
+
'title' => __( 'H2 Separator height', 'kadence-woocommerce-email-designer' ),
|
1756 |
'section' => 'headings_style',
|
1757 |
'control_type' => 'rangevalue',
|
1758 |
+
'default' => self::get_default_value( 'h2_style' ),
|
1759 |
'live_method' => 'css',
|
1760 |
'type' => 'select',
|
1761 |
'input_attrs' => array(
|
1764 |
'max' => 30,
|
1765 |
),
|
1766 |
'selectors' => array(
|
1767 |
+
'.title-style-below #template_body h2' => array( 'border-bottom-width' ),
|
1768 |
+
'.title-style-above #template_body h2' => array( 'border-top-width' ),
|
1769 |
),
|
1770 |
),
|
1771 |
// h2 style
|
1772 |
'h2_separator_style' => array(
|
1773 |
+
'title' => __( 'H2 Separator Style', 'kadence-woocommerce-email-designer' ),
|
1774 |
'section' => 'headings_style',
|
1775 |
+
'default' => self::get_default_value( 'h2_style' ),
|
1776 |
'live_method' => 'css',
|
1777 |
'type' => 'select',
|
1778 |
'choices' => array(
|
1779 |
+
'solid' => __( 'Solid', 'kadence-woocommerce-email-designer' ),
|
1780 |
+
'double' => __( 'Double', 'kadence-woocommerce-email-designer' ),
|
1781 |
+
'groove' => __( 'Groove', 'kadence-woocommerce-email-designer' ),
|
1782 |
+
'dotted' => __( 'Dotted', 'kadence-woocommerce-email-designer' ),
|
1783 |
+
'dashed' => __( 'Dashed', 'kadence-woocommerce-email-designer' ),
|
1784 |
+
'ridge' => __( 'Ridge', 'kadence-woocommerce-email-designer' ),
|
1785 |
),
|
1786 |
'selectors' => array(
|
1787 |
+
'.title-style-below #template_body h2' => array( 'border-bottom-style' ),
|
1788 |
+
'.title-style-above #template_body h2' => array( 'border-top-style' ),
|
1789 |
),
|
1790 |
),
|
1791 |
// separator color
|
1792 |
'h2_separator_color' => array(
|
1793 |
+
'title' => __( 'H2 Separator Color', 'kadence-woocommerce-email-designer' ),
|
1794 |
'section' => 'headings_style',
|
1795 |
'control_type' => 'color',
|
1796 |
+
'default' => self::get_default_value( 'h2_separator_color' ),
|
1797 |
'live_method' => 'css',
|
1798 |
'selectors' => array(
|
1799 |
+
'.title-style-below #template_body h2' => array( 'border-bottom-color' ),
|
1800 |
+
'.title-style-above #template_body h2' => array( 'border-top-color' ),
|
1801 |
),
|
1802 |
),
|
1803 |
// H3 TEXT STYLE
|
1804 |
//h3 Info
|
1805 |
'h3_font_info' => array(
|
1806 |
+
'title' => __( 'H3 Settings', 'kadence-woocommerce-email-designer' ),
|
1807 |
'section' => 'headings_style',
|
1808 |
'control_type' => 'kwdinfoblock',
|
1809 |
'description' => '',
|
1810 |
),
|
1811 |
// Font size
|
1812 |
'h3_font_size' => array(
|
1813 |
+
'title' => __( 'H3 Font Size', 'kadence-woocommerce-email-designer' ),
|
1814 |
'control_type' => 'rangevalue',
|
1815 |
'section' => 'headings_style',
|
1816 |
+
'default' => self::get_default_value( 'h3_font_size' ),
|
1817 |
'live_method' => 'css',
|
1818 |
'selectors' => array(
|
1819 |
+
'#template_body h3' => array( 'font-size' ),
|
1820 |
),
|
1821 |
'input_attrs' => array(
|
1822 |
'step' => 1,
|
1824 |
'max' => 30,
|
1825 |
),
|
1826 |
),
|
1827 |
+
// h3 Line Height.
|
1828 |
'h3_line_height' => array(
|
1829 |
+
'title' => __( 'H3 Line Height', 'kadence-woocommerce-email-designer' ),
|
1830 |
'control_type' => 'rangevalue',
|
1831 |
'section' => 'headings_style',
|
1832 |
+
'default' => self::get_default_value( 'h2_line_height' ),
|
1833 |
'live_method' => 'css',
|
1834 |
'selectors' => array(
|
1835 |
+
'#template_body h3' => array( 'line-height' ),
|
1836 |
),
|
1837 |
'input_attrs' => array(
|
1838 |
'step' => 1,
|
1840 |
'max' => 90,
|
1841 |
),
|
1842 |
),
|
1843 |
+
// h3 Font family.
|
1844 |
'h3_font_family' => array(
|
1845 |
+
'title' => __( 'H3 Font Family', 'kadence-woocommerce-email-designer' ),
|
1846 |
'section' => 'headings_style',
|
1847 |
+
'default' => self::get_default_value( 'h2_font_family' ),
|
1848 |
'live_method' => 'css',
|
1849 |
'type' => 'select',
|
1850 |
'choices' => self::get_font_families(),
|
1851 |
'selectors' => array(
|
1852 |
+
'#template_body h3' => array( 'font-family' ),
|
1853 |
),
|
1854 |
),
|
1855 |
+
// h3 Font style.
|
1856 |
'h3_font_style' => array(
|
1857 |
+
'title' => __( 'H3 Font Style', 'kadence-woocommerce-email-designer' ),
|
1858 |
'section' => 'headings_style',
|
1859 |
+
'default' => self::get_default_value( 'h3_font_style' ),
|
1860 |
'live_method' => 'css',
|
1861 |
'type' => 'select',
|
1862 |
'choices' => array(
|
1863 |
+
'normal' => __( 'Normal', 'kadence-woocommerce-email-designer' ),
|
1864 |
+
'italic' => __( 'Italic', 'kadence-woocommerce-email-designer' ),
|
1865 |
),
|
1866 |
'selectors' => array(
|
1867 |
+
'#template_body h3' => array( 'font-style' ),
|
1868 |
),
|
1869 |
),
|
1870 |
+
// h3 Font weight.
|
1871 |
'h3_font_weight' => array(
|
1872 |
+
'title' => __( 'H3 Font weight', 'kadence-woocommerce-email-designer' ),
|
1873 |
'control_type' => 'rangevalue',
|
1874 |
'section' => 'headings_style',
|
1875 |
+
'default' => self::get_default_value( 'h3_font_weight' ),
|
1876 |
'live_method' => 'css',
|
1877 |
'selectors' => array(
|
1878 |
+
'#template_body h3' => array( 'font-weight' ),
|
1879 |
),
|
1880 |
'input_attrs' => array(
|
1881 |
'step' => 100,
|
1883 |
'max' => 900,
|
1884 |
),
|
1885 |
),
|
1886 |
+
// H3 color.
|
1887 |
'h3_color' => array(
|
1888 |
+
'title' => __( 'H3 Color', 'kadence-woocommerce-email-designer' ),
|
1889 |
'section' => 'headings_style',
|
1890 |
'control_type' => 'color',
|
1891 |
+
'default' => self::get_default_value( 'h3_color' ),
|
1892 |
'live_method' => 'css',
|
1893 |
'selectors' => array(
|
1894 |
+
'#template_body h3' => array( 'color' ),
|
1895 |
),
|
1896 |
),
|
1897 |
+
// Order ITEMS.
|
1898 |
'order_items_style' => array(
|
1899 |
+
'title' => __( 'Order Table Style', 'kadence-woocommerce-email-designer' ),
|
1900 |
'section' => 'items_table',
|
1901 |
+
'default' => self::get_default_value( 'order_items_style' ),
|
1902 |
'transport' => 'refresh',
|
1903 |
'type' => 'select',
|
1904 |
'choices' => array(
|
1905 |
+
'normal' => __( 'Normal', 'kadence-woocommerce-email-designer' ),
|
1906 |
+
'light' => __( 'Light', 'kadence-woocommerce-email-designer' ),
|
1907 |
),
|
1908 |
),
|
1909 |
+
// Order ITEMS Image.
|
1910 |
'order_items_image' => array(
|
1911 |
+
'title' => __( 'Product Image Option', 'kadence-woocommerce-email-designer' ),
|
1912 |
'section' => 'items_table',
|
1913 |
'default' => self::get_default_value( 'order_items_image' ),
|
1914 |
'transport' => 'refresh',
|
1915 |
'type' => 'select',
|
1916 |
'choices' => array(
|
1917 |
+
'normal' => __( 'Do not show', 'kadence-woocommerce-email-designer' ),
|
1918 |
+
'show' => __( 'Show', 'kadence-woocommerce-email-designer' ),
|
1919 |
),
|
1920 |
),
|
1921 |
+
// Items table Background color.
|
1922 |
'items_table_background_color' => array(
|
1923 |
+
'title' => __( 'Order Table Background color', 'kadence-woocommerce-email-designer' ),
|
1924 |
+
'section' => 'items_table',
|
1925 |
+
'control_type' => 'color',
|
1926 |
+
'default' => self::get_default_value( 'items_table_background_color' ),
|
1927 |
+
'live_method' => 'css',
|
1928 |
+
'selectors' => array(
|
1929 |
+
'#body_content_inner table.td' => array( 'background-color' ),
|
1930 |
+
),
|
1931 |
+
),
|
1932 |
+
// Items table Background color.
|
1933 |
+
'items_table_background_odd_color' => array(
|
1934 |
+
'title' => __( 'Order Table Background Odd Row Color', 'kadence-woocommerce-email-designer' ),
|
1935 |
'section' => 'items_table',
|
1936 |
'control_type' => 'color',
|
1937 |
+
'default' => self::get_default_value( 'items_table_background_odd_color' ),
|
1938 |
'live_method' => 'css',
|
1939 |
'selectors' => array(
|
1940 |
+
'#body_content_inner table.td tbody tr:nth-child(even)' => array( 'background-color' ),
|
1941 |
+
'#body_content_inner table.td thead tr' => array( 'background-color' ),
|
1942 |
+
'#body_content_inner table.td tfoot tr:nth-child(odd)' => array( 'background-color' ),
|
1943 |
),
|
1944 |
),
|
1945 |
|
1946 |
+
// Items table Padding.
|
1947 |
'items_table_padding' => array(
|
1948 |
+
'title' => __( 'Padding Top and Bottom', 'kadence-woocommerce-email-designer' ),
|
1949 |
'control_type' => 'rangevalue',
|
1950 |
'section' => 'items_table',
|
1951 |
+
'default' => self::get_default_value( 'items_table_padding' ),
|
1952 |
'live_method' => 'css',
|
1953 |
'selectors' => array(
|
1954 |
+
'.order-items-normal #body_content_inner table.td th' => array( 'padding-top', 'padding-bottom' ),
|
1955 |
+
'.order-items-normal #body_content_inner table.td td' => array( 'padding-top', 'padding-bottom' ),
|
1956 |
+
'.order-items-light #body_content_inner table.td th' => array( 'padding-top', 'padding-bottom' ),
|
1957 |
+
'.order-items-light #body_content_inner table.td td' => array( 'padding-top', 'padding-bottom' ),
|
1958 |
+
),
|
1959 |
+
'input_attrs' => array(
|
1960 |
+
'step' => 1,
|
1961 |
+
'min' => 0,
|
1962 |
+
'max' => 50,
|
1963 |
+
),
|
1964 |
+
),
|
1965 |
+
// Items table Padding Left and Right.
|
1966 |
+
'items_table_padding_left_right' => array(
|
1967 |
+
'title' => __( 'Padding Left and Right', 'kadence-woocommerce-email-designer' ),
|
1968 |
+
'control_type' => 'rangevalue',
|
1969 |
+
'section' => 'items_table',
|
1970 |
+
'default' => str_replace( 'px', '', Kadence_Woomail_Customizer::opt( 'items_table_padding' ) ),
|
1971 |
+
'live_method' => 'css',
|
1972 |
+
'selectors' => array(
|
1973 |
+
'.order-items-normal #body_content_inner table.td th' => array( 'padding-left', 'padding-right' ),
|
1974 |
+
'.order-items-normal #body_content_inner table.td td' => array( 'padding-left', 'padding-right' ),
|
1975 |
),
|
1976 |
'input_attrs' => array(
|
1977 |
'step' => 1,
|
1982 |
|
1983 |
// Items table Border width
|
1984 |
'items_table_border_width' => array(
|
1985 |
+
'title' => __( 'Border Width', 'kadence-woocommerce-email-designer' ),
|
1986 |
'control_type' => 'rangevalue',
|
1987 |
'section' => 'items_table',
|
1988 |
+
'default' => self::get_default_value( 'items_table_border_width' ),
|
1989 |
'live_method' => 'css',
|
1990 |
'selectors' => array(
|
1991 |
+
'.order-items-normal #body_content_inner .td' => array( 'border-width' ),
|
1992 |
+
'.order-items-light #body_content_inner table.td .td' => array( 'border-bottom-width' ),
|
1993 |
+
'.order-items-light #body_content_inner table.td' => array( 'border-top-width' ),
|
1994 |
),
|
1995 |
'input_attrs' => array(
|
1996 |
'step' => 1,
|
2001 |
|
2002 |
// Items table Border color
|
2003 |
'items_table_border_color' => array(
|
2004 |
+
'title' => __( 'Border Color', 'kadence-woocommerce-email-designer' ),
|
2005 |
'section' => 'items_table',
|
2006 |
'control_type' => 'color',
|
2007 |
+
'default' => self::get_default_value( 'items_table_border_color' ),
|
2008 |
'live_method' => 'css',
|
2009 |
'selectors' => array(
|
2010 |
+
'#body_content_inner .td' => array( 'border-color' ),
|
2011 |
),
|
2012 |
),
|
2013 |
// tems table border style
|
2014 |
'items_table_border_style' => array(
|
2015 |
+
'title' => __( 'Border Style', 'kadence-woocommerce-email-designer' ),
|
2016 |
'section' => 'items_table',
|
2017 |
+
'default' => self::get_default_value( 'items_table_border_style' ),
|
2018 |
'live_method' => 'css',
|
2019 |
'type' => 'select',
|
2020 |
'choices' => array(
|
2021 |
+
'solid' => __( 'Solid', 'kadence-woocommerce-email-designer' ),
|
2022 |
+
'double' => __( 'Double', 'kadence-woocommerce-email-designer' ),
|
2023 |
+
'groove' => __( 'Groove', 'kadence-woocommerce-email-designer' ),
|
2024 |
+
'dotted' => __( 'Dotted', 'kadence-woocommerce-email-designer' ),
|
2025 |
+
'dashed' => __( 'Dashed', 'kadence-woocommerce-email-designer' ),
|
2026 |
+
'ridge' => __( 'Ridge', 'kadence-woocommerce-email-designer' ),
|
2027 |
),
|
2028 |
'selectors' => array(
|
2029 |
+
'.order-items-normal #body_content_inner .td' => array( 'border-style' ),
|
2030 |
+
'.order-items-light #body_content_inner table.td .td' => array( 'border-bottom-style' ),
|
2031 |
+
'.order-items-light #body_content_inner table.td' => array( 'border-top-style' ),
|
2032 |
),
|
2033 |
),
|
2034 |
// Order ITEMS
|
2035 |
'order_heading_style' => array(
|
2036 |
+
'title' => __( 'Order Table Heading Style', 'kadence-woocommerce-email-designer' ),
|
2037 |
'section' => 'items_table',
|
2038 |
+
'default' => self::get_default_value( 'order_heading_style' ),
|
2039 |
'transport' => 'refresh',
|
2040 |
'type' => 'select',
|
2041 |
'choices' => array(
|
2042 |
+
'normal' => __( 'Normal', 'kadence-woocommerce-email-designer' ),
|
2043 |
+
'split' => __( 'Split', 'kadence-woocommerce-email-designer' ),
|
2044 |
+
),
|
2045 |
+
),
|
2046 |
+
'notes_outside_table' => array(
|
2047 |
+
'title' => __( 'Enable Order Notes to be moved below table.', 'kadence-woocommerce-email-designer' ),
|
2048 |
+
'control_type' => 'toggleswitch',
|
2049 |
+
'section' => 'items_table',
|
2050 |
+
'transport' => 'refresh',
|
2051 |
+
'default' => self::get_default_value( 'notes_outside_table' ),
|
2052 |
+
'active_callback' => array(
|
2053 |
+
'id' => 'responsive_mode',
|
2054 |
+
'compare' => '==',
|
2055 |
+
'value' => false,
|
2056 |
),
|
2057 |
),
|
2058 |
//addresses Background color
|
2059 |
'addresses_background_color' => array(
|
2060 |
+
'title' => __( 'Address Box Background color', 'kadence-woocommerce-email-designer' ),
|
2061 |
'section' => 'addresses',
|
2062 |
'control_type' => 'color',
|
2063 |
+
'default' => self::get_default_value( 'addresses_background_color' ),
|
2064 |
+
'live_method' => 'css',
|
2065 |
+
'selectors' => array(
|
2066 |
+
'#body_content_inner .address-td' => array( 'background-color' ),
|
2067 |
+
),
|
2068 |
+
),
|
2069 |
+
// addresses Padding
|
2070 |
+
'addresses_padding' => array(
|
2071 |
+
'title' => __( 'Address Box Padding', 'kadence-woocommerce-email-designer' ),
|
2072 |
+
'control_type' => 'rangevalue',
|
2073 |
+
'section' => 'addresses',
|
2074 |
+
'default' => self::get_default_value( 'addresses_padding' ),
|
2075 |
'live_method' => 'css',
|
2076 |
'selectors' => array(
|
2077 |
+
'#body_content_inner .address-td' => array( 'padding' ),
|
2078 |
+
),
|
2079 |
+
'input_attrs' => array(
|
2080 |
+
'step' => 1,
|
2081 |
+
'min' => 0,
|
2082 |
+
'max' => 100,
|
2083 |
),
|
2084 |
),
|
2085 |
// addresses Border width
|
2086 |
'addresses_border_width' => array(
|
2087 |
+
'title' => __( 'Address Box Border Width', 'kadence-woocommerce-email-designer' ),
|
2088 |
'control_type' => 'rangevalue',
|
2089 |
'section' => 'addresses',
|
2090 |
+
'default' => self::get_default_value( 'addresses_border_width' ),
|
2091 |
'live_method' => 'css',
|
2092 |
'selectors' => array(
|
2093 |
+
'#body_content_inner .address-td' => array( 'border-width' ),
|
2094 |
),
|
2095 |
'input_attrs' => array(
|
2096 |
'step' => 1,
|
2100 |
),
|
2101 |
// addresses Border color
|
2102 |
'addresses_border_color' => array(
|
2103 |
+
'title' => __( 'Address Box Border Color', 'kadence-woocommerce-email-designer' ),
|
2104 |
'section' => 'addresses',
|
2105 |
'control_type' => 'color',
|
2106 |
+
'default' => self::get_default_value( 'addresses_border_color' ),
|
2107 |
'live_method' => 'css',
|
2108 |
'selectors' => array(
|
2109 |
+
'#body_content_inner .address-td' => array( 'border-color' ),
|
2110 |
),
|
2111 |
),
|
2112 |
// h2 style
|
2113 |
'addresses_border_style' => array(
|
2114 |
+
'title' => __( 'Address Box Border Style', 'kadence-woocommerce-email-designer' ),
|
2115 |
'section' => 'addresses',
|
2116 |
+
'default' => self::get_default_value( 'addresses_border_style' ),
|
2117 |
'live_method' => 'css',
|
2118 |
'type' => 'select',
|
2119 |
'choices' => array(
|
2120 |
+
'solid' => __( 'Solid', 'kadence-woocommerce-email-designer' ),
|
2121 |
+
'double' => __( 'Double', 'kadence-woocommerce-email-designer' ),
|
2122 |
+
'groove' => __( 'Groove', 'kadence-woocommerce-email-designer' ),
|
2123 |
+
'dotted' => __( 'Dotted', 'kadence-woocommerce-email-designer' ),
|
2124 |
+
'dashed' => __( 'Dashed', 'kadence-woocommerce-email-designer' ),
|
2125 |
+
'ridge' => __( 'Ridge', 'kadence-woocommerce-email-designer' ),
|
2126 |
),
|
2127 |
'selectors' => array(
|
2128 |
+
'#body_content_inner .address-td' => array( 'border-style' ),
|
2129 |
),
|
2130 |
),
|
2131 |
// addresses color
|
2132 |
'addresses_text_color' => array(
|
2133 |
+
'title' => __( 'Address Box Text Color', 'kadence-woocommerce-email-designer' ),
|
2134 |
'section' => 'addresses',
|
2135 |
'control_type' => 'color',
|
2136 |
+
'default' => self::get_default_value( 'addresses_text_color' ),
|
2137 |
'live_method' => 'css',
|
2138 |
'selectors' => array(
|
2139 |
+
'#body_content_inner .address-td' => array( 'color' ),
|
2140 |
),
|
2141 |
),
|
2142 |
// addresses text align
|
2143 |
'addresses_text_align' => array(
|
2144 |
+
'title' => __( 'Address Box Text Align', 'kadence-woocommerce-email-designer' ),
|
2145 |
'section' => 'addresses',
|
2146 |
+
'default' => self::get_default_value( 'addresses_text_align' ),
|
2147 |
'live_method' => 'css',
|
2148 |
'type' => 'select',
|
2149 |
'choices' => self::get_text_aligns(),
|
2150 |
'selectors' => array(
|
2151 |
+
'#body_content_inner .address-td' => array( 'text-align' ),
|
2152 |
),
|
2153 |
),
|
2154 |
// Footer Background Width
|
2155 |
'footer_background_placement' => array(
|
2156 |
+
'title' => __( 'Footer Background Placement', 'kadence-woocommerce-email-designer' ),
|
2157 |
'section' => 'footer_style',
|
2158 |
+
'default' => self::get_default_value( 'footer_background_placement' ),
|
2159 |
'transport' => 'refresh',
|
2160 |
'type' => 'select',
|
2161 |
'choices' => array(
|
2162 |
+
'inside' => __( 'Inside Body Container', 'kadence-woocommerce-email-designer' ),
|
2163 |
+
'outside' => __( 'Outside Body Container', 'kadence-woocommerce-email-designer' ),
|
2164 |
),
|
2165 |
),
|
2166 |
// Footer Background Color
|
2167 |
'footer_background_color' => array(
|
2168 |
+
'title' => __( 'Footer Background Color', 'kadence-woocommerce-email-designer' ),
|
2169 |
'section' => 'footer_style',
|
2170 |
'control_type' => 'color',
|
2171 |
+
'default' => self::get_default_value( 'footer_background_color' ),
|
2172 |
'live_method' => 'css',
|
2173 |
'selectors' => array(
|
2174 |
+
'#template_footer_container' => array( 'background-color' ),
|
2175 |
),
|
2176 |
),
|
2177 |
// Footer Top Padding
|
2178 |
'footer_top_padding' => array(
|
2179 |
+
'title' => __( 'Top Padding', 'kadence-woocommerce-email-designer' ),
|
2180 |
'control_type' => 'rangevalue',
|
2181 |
'section' => 'footer_style',
|
2182 |
+
'default' => self::get_default_value( 'footer_top_padding' ),
|
2183 |
'live_method' => 'css',
|
2184 |
'selectors' => array(
|
2185 |
+
'#template_footer #template_footer_inside' => array( 'padding-top' ),
|
2186 |
),
|
2187 |
'input_attrs' => array(
|
2188 |
'step' => 1,
|
2192 |
),
|
2193 |
// Footer Bottom Padding
|
2194 |
'footer_bottom_padding' => array(
|
2195 |
+
'title' => __( 'Bottom Padding', 'kadence-woocommerce-email-designer' ),
|
2196 |
'control_type' => 'rangevalue',
|
2197 |
'section' => 'footer_style',
|
2198 |
+
'default' => self::get_default_value( 'footer_bottom_padding' ),
|
2199 |
'live_method' => 'css',
|
2200 |
'selectors' => array(
|
2201 |
+
'#template_footer #template_footer_inside' => array( 'padding-bottom' ),
|
2202 |
),
|
2203 |
'input_attrs' => array(
|
2204 |
'step' => 1,
|
2208 |
),
|
2209 |
// Footer left and right Padding
|
2210 |
'footer_left_right_padding' => array(
|
2211 |
+
'title' => __( 'Left/Right Padding', 'kadence-woocommerce-email-designer' ),
|
2212 |
'control_type' => 'rangevalue',
|
2213 |
'section' => 'footer_style',
|
2214 |
+
'default' => self::get_default_value( 'footer_left_right_padding' ),
|
2215 |
'live_method' => 'css',
|
2216 |
'selectors' => array(
|
2217 |
+
'#template_footer #template_footer_inside' => array( 'padding-left', 'padding-right' ),
|
2218 |
),
|
2219 |
'input_attrs' => array(
|
2220 |
'step' => 1,
|
2223 |
),
|
2224 |
),
|
2225 |
'footer_social_enable' => array(
|
2226 |
+
'title' => __( 'Enable Social Section', 'kadence-woocommerce-email-designer' ),
|
2227 |
'control_type' => 'toggleswitch',
|
2228 |
'section' => 'footer_social',
|
2229 |
'transport' => 'refresh',
|
2231 |
),
|
2232 |
// Footer social repeater
|
2233 |
'footer_social_repeater' => array(
|
2234 |
+
'title' => __( 'Footer Social Options', 'kadence-woocommerce-email-designer' ),
|
2235 |
'control_type' => 'repeater',
|
2236 |
'transport' => 'refresh',
|
2237 |
'section' => 'footer_social',
|
2245 |
),
|
2246 |
// Footer Social Title Color
|
2247 |
'footer_social_title_color' => array(
|
2248 |
+
'title' => __( 'Footer Social Title Color', 'kadence-woocommerce-email-designer' ),
|
2249 |
'section' => 'footer_social',
|
2250 |
+
'default' => self::get_default_value( 'footer_social_title_color' ),
|
2251 |
'live_method' => 'css',
|
2252 |
'selectors' => array(
|
2253 |
+
'#template_footer a.ft-social-link' => array( 'color' ),
|
2254 |
),
|
2255 |
'control_type' => 'color',
|
2256 |
),
|
2257 |
// Footer Social Title Font size
|
2258 |
'footer_social_title_size' => array(
|
2259 |
+
'title' => __( 'Footer Social Title Font Size', 'kadence-woocommerce-email-designer' ),
|
2260 |
'control_type' => 'rangevalue',
|
2261 |
'section' => 'footer_social',
|
2262 |
+
'default' => self::get_default_value( 'footer_social_title_font_size' ),
|
2263 |
'live_method' => 'css',
|
2264 |
'selectors' => array(
|
2265 |
+
'#template_footer .ft-social-title' => array( 'font-size' ),
|
2266 |
),
|
2267 |
'input_attrs' => array(
|
2268 |
'step' => 1,
|
2272 |
),
|
2273 |
// Footer Social Title Font family
|
2274 |
'footer_social_title_font_family' => array(
|
2275 |
+
'title' => __( 'Footer Social Title Font Family', 'kadence-woocommerce-email-designer' ),
|
2276 |
'section' => 'footer_social',
|
2277 |
+
'default' => self::get_default_value( 'footer_social_title_font_family' ),
|
2278 |
'live_method' => 'css',
|
2279 |
'type' => 'select',
|
2280 |
'choices' => self::get_font_families(),
|
2281 |
'selectors' => array(
|
2282 |
+
'#template_footer a.ft-social-link' => array( 'font-family' ),
|
2283 |
),
|
2284 |
),
|
2285 |
// Footer Social Title Font weight
|
2286 |
'footer_social_title_font_weight' => array(
|
2287 |
+
'title' => __( 'Footer Social Title Font Weight', 'kadence-woocommerce-email-designer' ),
|
2288 |
'control_type' => 'rangevalue',
|
2289 |
'section' => 'footer_social',
|
2290 |
+
'default' => self::get_default_value( 'footer_social_title_font_weight' ),
|
2291 |
'live_method' => 'css',
|
2292 |
'selectors' => array(
|
2293 |
+
'#template_footer .ft-social-title' => array( 'font-weight' ),
|
2294 |
),
|
2295 |
'input_attrs' => array(
|
2296 |
'step' => 100,
|
2300 |
),
|
2301 |
// Footer Social Top Padding
|
2302 |
'footer_social_top_padding' => array(
|
2303 |
+
'title' => __( 'Top Padding', 'kadence-woocommerce-email-designer' ),
|
2304 |
'control_type' => 'rangevalue',
|
2305 |
'section' => 'footer_social',
|
2306 |
+
'default' => self::get_default_value( 'footer_social_top_padding' ),
|
2307 |
'live_method' => 'css',
|
2308 |
'selectors' => array(
|
2309 |
+
'#template_footer #footersocial td' => array( 'padding-top' ),
|
2310 |
),
|
2311 |
'input_attrs' => array(
|
2312 |
'step' => 1,
|
2316 |
),
|
2317 |
// Footer Social Bottom Padding
|
2318 |
'footer_social_bottom_padding' => array(
|
2319 |
+
'title' => __( 'Bottom Padding', 'kadence-woocommerce-email-designer' ),
|
2320 |
'control_type' => 'rangevalue',
|
2321 |
'section' => 'footer_social',
|
2322 |
+
'default' => self::get_default_value( 'footer_social_bottom_padding' ),
|
2323 |
'live_method' => 'css',
|
2324 |
'selectors' => array(
|
2325 |
+
'#template_footer #footersocial td' => array( 'padding-bottom' ),
|
2326 |
),
|
2327 |
'input_attrs' => array(
|
2328 |
'step' => 1,
|
2332 |
),
|
2333 |
// Footer Social Bottom Border width
|
2334 |
'footer_social_border_width' => array(
|
2335 |
+
'title' => __( 'Footer Social Bottom Border Width', 'kadence-woocommerce-email-designer' ),
|
2336 |
'control_type' => 'rangevalue',
|
2337 |
'section' => 'footer_social',
|
2338 |
+
'default' => self::get_default_value( 'footer_social_border_width' ),
|
2339 |
'live_method' => 'css',
|
2340 |
'selectors' => array(
|
2341 |
+
'#footersocial' => array( 'border-bottom-width' ),
|
2342 |
),
|
2343 |
'input_attrs' => array(
|
2344 |
'step' => 1,
|
2348 |
),
|
2349 |
// Footer Social Bottom Bordercolor
|
2350 |
'footer_social_border_color' => array(
|
2351 |
+
'title' => __( 'Footer Social Bottom Border Color', 'kadence-woocommerce-email-designer' ),
|
2352 |
'section' => 'footer_social',
|
2353 |
'control_type' => 'color',
|
2354 |
+
'default' => self::get_default_value( 'footer_social_border_color' ),
|
2355 |
'live_method' => 'css',
|
2356 |
'selectors' => array(
|
2357 |
+
'#footersocial' => array( 'border-bottom-color' ),
|
2358 |
),
|
2359 |
),
|
2360 |
//Footer Social Bottom Border style
|
2361 |
'footer_social_border_style' => array(
|
2362 |
+
'title' => __( 'Footer Social Bottom Border Style', 'kadence-woocommerce-email-designer' ),
|
2363 |
'section' => 'footer_social',
|
2364 |
+
'default' => self::get_default_value( 'footer_social_border_style' ),
|
2365 |
'live_method' => 'css',
|
2366 |
'type' => 'select',
|
2367 |
'choices' => array(
|
2368 |
+
'solid' => __( 'Solid', 'kadence-woocommerce-email-designer' ),
|
2369 |
+
'double' => __( 'Double', 'kadence-woocommerce-email-designer' ),
|
2370 |
+
'groove' => __( 'Groove', 'kadence-woocommerce-email-designer' ),
|
2371 |
+
'dotted' => __( 'Dotted', 'kadence-woocommerce-email-designer' ),
|
2372 |
+
'dashed' => __( 'Dashed', 'kadence-woocommerce-email-designer' ),
|
2373 |
+
'ridge' => __( 'Ridge', 'kadence-woocommerce-email-designer' ),
|
2374 |
),
|
2375 |
'selectors' => array(
|
2376 |
+
'#footersocial' => array( 'border-bottom-style' ),
|
2377 |
),
|
2378 |
),
|
2379 |
// Footer Text align
|
2380 |
'footer_text_align' => array(
|
2381 |
+
'title' => __( 'Text Align', 'kadence-woocommerce-email-designer' ),
|
2382 |
'section' => 'footer_content',
|
2383 |
+
'default' => self::get_default_value( 'footer_text_align' ),
|
2384 |
'live_method' => 'css',
|
2385 |
'type' => 'select',
|
2386 |
'choices' => self::get_text_aligns(),
|
2387 |
'selectors' => array(
|
2388 |
+
'#template_footer #credit' => array( 'text-align' ),
|
2389 |
),
|
2390 |
),
|
2391 |
|
2392 |
// Footer Font size
|
2393 |
'footer_font_size' => array(
|
2394 |
+
'title' => __( 'Font Size', 'kadence-woocommerce-email-designer' ),
|
2395 |
'control_type' => 'rangevalue',
|
2396 |
'section' => 'footer_content',
|
2397 |
+
'default' => self::get_default_value( 'footer_font_size' ),
|
2398 |
'live_method' => 'css',
|
2399 |
'selectors' => array(
|
2400 |
+
'#template_footer #credit' => array( 'font-size' ),
|
2401 |
),
|
2402 |
'input_attrs' => array(
|
2403 |
'step' => 1,
|
2407 |
),
|
2408 |
// Footer Font family
|
2409 |
'footer_font_family' => array(
|
2410 |
+
'title' => __( 'Font Family', 'kadence-woocommerce-email-designer' ),
|
2411 |
'section' => 'footer_content',
|
2412 |
+
'default' => self::get_default_value( 'footer_font_family' ),
|
2413 |
'live_method' => 'css',
|
2414 |
'type' => 'select',
|
2415 |
'choices' => self::get_font_families(),
|
2416 |
'selectors' => array(
|
2417 |
+
'#template_footer #credit' => array( 'font-family' ),
|
2418 |
),
|
2419 |
),
|
2420 |
|
2421 |
// Footer Font weight
|
2422 |
'footer_font_weight' => array(
|
2423 |
+
'title' => __( 'Font weight', 'kadence-woocommerce-email-designer' ),
|
2424 |
'control_type' => 'rangevalue',
|
2425 |
'section' => 'footer_content',
|
2426 |
+
'default' => self::get_default_value( 'footer_font_weight' ),
|
2427 |
'live_method' => 'css',
|
2428 |
'selectors' => array(
|
2429 |
+
'#template_footer #credit' => array( 'font-weight' ),
|
2430 |
),
|
2431 |
'input_attrs' => array(
|
2432 |
'step' => 100,
|
2437 |
|
2438 |
// Footer Color
|
2439 |
'footer_color' => array(
|
2440 |
+
'title' => __( 'Text Color', 'kadence-woocommerce-email-designer' ),
|
2441 |
'section' => 'footer_content',
|
2442 |
'control_type' => 'color',
|
2443 |
+
'default' => self::get_default_value( 'footer_color' ),
|
2444 |
'live_method' => 'css',
|
2445 |
'selectors' => array(
|
2446 |
+
'#template_footer #credit' => array( 'color' ),
|
2447 |
),
|
2448 |
),
|
2449 |
// Footer credit Top Padding
|
2450 |
'footer_credit_top_padding' => array(
|
2451 |
+
'title' => __( 'Top Padding', 'kadence-woocommerce-email-designer' ),
|
2452 |
'control_type' => 'rangevalue',
|
2453 |
'section' => 'footer_content',
|
2454 |
+
'default' => self::get_default_value( 'footer_credit_top_padding' ),
|
2455 |
'live_method' => 'css',
|
2456 |
'selectors' => array(
|
2457 |
+
'#template_footer #credit' => array( 'padding-top' ),
|
2458 |
),
|
2459 |
'input_attrs' => array(
|
2460 |
'step' => 1,
|
2464 |
),
|
2465 |
// Footer credit Bottom Padding
|
2466 |
'footer_credit_bottom_padding' => array(
|
2467 |
+
'title' => __( 'Bottom Padding', 'kadence-woocommerce-email-designer' ),
|
2468 |
'control_type' => 'rangevalue',
|
2469 |
'section' => 'footer_content',
|
2470 |
+
'default' => self::get_default_value( 'footer_credit_bottom_padding' ),
|
2471 |
+
'live_method' => 'css',
|
2472 |
+
'selectors' => array(
|
2473 |
+
'#template_footer #credit' => array( 'padding-bottom' ),
|
2474 |
+
),
|
2475 |
+
'input_attrs' => array(
|
2476 |
+
'step' => 1,
|
2477 |
+
'min' => 0,
|
2478 |
+
'max' => 150,
|
2479 |
+
),
|
2480 |
+
),
|
2481 |
+
// Button Color.
|
2482 |
+
'btn_color' => array(
|
2483 |
+
'title' => __( 'Button Text Color', 'kadence-woocommerce-email-designer' ),
|
2484 |
+
'section' => 'btn_styles',
|
2485 |
+
'default' => self::get_default_value( 'btn_color' ),
|
2486 |
+
'live_method' => 'css',
|
2487 |
+
'selectors' => array(
|
2488 |
+
'a.btn' => array( 'color' ),
|
2489 |
+
),
|
2490 |
+
'control_type' => 'color',
|
2491 |
+
),
|
2492 |
+
// Button Text Size.
|
2493 |
+
'btn_size' => array(
|
2494 |
+
'title' => __( 'Button Font Size', 'kadence-woocommerce-email-designer' ),
|
2495 |
+
'control_type' => 'rangevalue',
|
2496 |
+
'section' => 'btn_styles',
|
2497 |
+
'default' => self::get_default_value( 'btn_size' ),
|
2498 |
+
'live_method' => 'css',
|
2499 |
+
'selectors' => array(
|
2500 |
+
'a.btn' => array( 'font-size' ),
|
2501 |
+
),
|
2502 |
+
'input_attrs' => array(
|
2503 |
+
'step' => 1,
|
2504 |
+
'min' => 8,
|
2505 |
+
'max' => 30,
|
2506 |
+
),
|
2507 |
+
),
|
2508 |
+
// Button Font Family
|
2509 |
+
'btn_font_family' => array(
|
2510 |
+
'title' => __( 'Button Font Family', 'kadence-woocommerce-email-designer' ),
|
2511 |
+
'section' => 'btn_styles',
|
2512 |
+
'default' => self::get_default_value( 'btn_font_family' ),
|
2513 |
+
'live_method' => 'css',
|
2514 |
+
'type' => 'select',
|
2515 |
+
'choices' => self::get_font_families(),
|
2516 |
+
'selectors' => array(
|
2517 |
+
'a.btn' => array( 'font-family' ),
|
2518 |
+
),
|
2519 |
+
),
|
2520 |
+
// Button Font weight.
|
2521 |
+
'btn_font_weight' => array(
|
2522 |
+
'title' => __( 'Button Font Weight', 'kadence-woocommerce-email-designer' ),
|
2523 |
+
'control_type' => 'rangevalue',
|
2524 |
+
'section' => 'btn_styles',
|
2525 |
+
'default' => self::get_default_value( 'btn_font_weight' ),
|
2526 |
+
'live_method' => 'css',
|
2527 |
+
'selectors' => array(
|
2528 |
+
'a.btn' => array( 'font-weight' ),
|
2529 |
+
),
|
2530 |
+
'input_attrs' => array(
|
2531 |
+
'step' => 100,
|
2532 |
+
'min' => 100,
|
2533 |
+
'max' => 900,
|
2534 |
+
),
|
2535 |
+
),
|
2536 |
+
// Button Background Color.
|
2537 |
+
'btn_bg_color' => array(
|
2538 |
+
'title' => __( 'Button Background Color', 'kadence-woocommerce-email-designer' ),
|
2539 |
+
'section' => 'btn_styles',
|
2540 |
+
'default' => self::get_default_value( 'btn_bg_color' ),
|
2541 |
+
'live_method' => 'css',
|
2542 |
+
'selectors' => array(
|
2543 |
+
'a.btn' => array( 'background' ),
|
2544 |
+
),
|
2545 |
+
'control_type' => 'color',
|
2546 |
+
),
|
2547 |
+
// Button Top and bottom Padding.
|
2548 |
+
'btn_top_bottom_padding' => array(
|
2549 |
+
'title' => __( 'Top and Bottom Padding', 'kadence-woocommerce-email-designer' ),
|
2550 |
+
'control_type' => 'rangevalue',
|
2551 |
+
'section' => 'btn_styles',
|
2552 |
+
'default' => self::get_default_value( 'btn_top_bottom_padding' ),
|
2553 |
+
'live_method' => 'css',
|
2554 |
+
'selectors' => array(
|
2555 |
+
'a.btn' => array( 'padding-top', 'padding-bottom' ),
|
2556 |
+
),
|
2557 |
+
'input_attrs' => array(
|
2558 |
+
'step' => 1,
|
2559 |
+
'min' => 0,
|
2560 |
+
'max' => 150,
|
2561 |
+
),
|
2562 |
+
),
|
2563 |
+
// Button Left and Right Padding.
|
2564 |
+
'btn_left_right_padding' => array(
|
2565 |
+
'title' => __( 'Left and Right Padding', 'kadence-woocommerce-email-designer' ),
|
2566 |
+
'control_type' => 'rangevalue',
|
2567 |
+
'section' => 'btn_styles',
|
2568 |
+
'default' => self::get_default_value( 'btn_left_right_padding' ),
|
2569 |
'live_method' => 'css',
|
2570 |
'selectors' => array(
|
2571 |
+
'a.btn' => array( 'padding-left', 'padding-right' ),
|
2572 |
),
|
2573 |
'input_attrs' => array(
|
2574 |
'step' => 1,
|
2576 |
'max' => 150,
|
2577 |
),
|
2578 |
),
|
2579 |
+
// Button Border Width.
|
2580 |
+
'btn_border_width' => array(
|
2581 |
+
'title' => __( 'Button Border Width', 'kadence-woocommerce-email-designer' ),
|
2582 |
+
'control_type' => 'rangevalue',
|
2583 |
+
'section' => 'btn_styles',
|
2584 |
+
'default' => self::get_default_value( 'btn_border_width' ),
|
2585 |
+
'live_method' => 'css',
|
2586 |
+
'selectors' => array(
|
2587 |
+
'a.btn' => array( 'border-width' ),
|
2588 |
+
),
|
2589 |
+
'input_attrs' => array(
|
2590 |
+
'step' => 1,
|
2591 |
+
'min' => 0,
|
2592 |
+
'max' => 10,
|
2593 |
+
),
|
2594 |
+
),
|
2595 |
+
// Border radius
|
2596 |
+
'btn_border_radius' => array(
|
2597 |
+
'title' => __( 'Border radius', 'kadence-woocommerce-email-designer' ),
|
2598 |
+
'control_type' => 'rangevalue',
|
2599 |
+
'section' => 'container',
|
2600 |
+
'default' => self::get_default_value( 'btn_border_radius' ),
|
2601 |
+
'live_method' => 'css',
|
2602 |
+
'description' => __( 'Warning: most desktop email clients do not yet support this.', 'kadence-woocommerce-email-designer' ),
|
2603 |
+
'selectors' => array(
|
2604 |
+
'a.btn' => array( 'border-radius' ),
|
2605 |
+
),
|
2606 |
+
'input_attrs' => array(
|
2607 |
+
'step' => 1,
|
2608 |
+
'min' => 0,
|
2609 |
+
'max' => 100,
|
2610 |
+
),
|
2611 |
+
),
|
2612 |
+
// Button Bordercolor
|
2613 |
+
'btn_border_color' => array(
|
2614 |
+
'title' => __( 'Button Border Color', 'kadence-woocommerce-email-designer' ),
|
2615 |
+
'section' => 'btn_styles',
|
2616 |
+
'control_type' => 'color',
|
2617 |
+
'default' => self::get_default_value( 'btn_border_color' ),
|
2618 |
+
'live_method' => 'css',
|
2619 |
+
'selectors' => array(
|
2620 |
+
'a.btn' => array( 'border-color' ),
|
2621 |
+
),
|
2622 |
+
),
|
2623 |
+
// Button Text align
|
2624 |
+
'btn_text_align' => array(
|
2625 |
+
'title' => __( 'Button Align', 'kadence-woocommerce-email-designer' ),
|
2626 |
+
'section' => 'btn_styles',
|
2627 |
+
'default' => self::get_default_value( 'btn_text_align' ),
|
2628 |
+
'live_method' => 'css',
|
2629 |
+
'type' => 'select',
|
2630 |
+
'choices' => self::get_text_aligns(),
|
2631 |
+
'selectors' => array(
|
2632 |
+
'#body_content_inner .btn-container' => array( 'text-align' ),
|
2633 |
+
),
|
2634 |
+
),
|
2635 |
'custom_css' => array(
|
2636 |
+
'title' => __( 'Custom CSS', 'kadence-woocommerce-email-designer' ),
|
2637 |
'section' => 'custom_styles',
|
2638 |
'default' => '',
|
2639 |
'type' => 'textarea',
|
2644 |
),
|
2645 |
),
|
2646 |
'import_export' => array(
|
2647 |
+
'title' => __( 'Import Export', 'kadence-woocommerce-email-designer' ),
|
2648 |
'section' => 'import_export',
|
2649 |
'default' => '',
|
2650 |
'control_type' => 'kwdimportexport',
|
2651 |
),
|
2652 |
'email_recipient' => array(
|
2653 |
+
'title' => __( 'Preview Email Recipient', 'kadence-woocommerce-email-designer' ),
|
2654 |
'description' => __( 'Enter recipients (comma separated) for preview emails', 'kadence-woocommerce-email-designer' ),
|
2655 |
'section' => 'send_email',
|
2656 |
+
'default' => self::get_default_value( 'email_recipient' ),
|
2657 |
'control_type' => 'kwdsendemail',
|
2658 |
),
|
2659 |
);
|
2674 |
public static function get_default_values() {
|
2675 |
// Define default values
|
2676 |
if ( is_null( self::$default_values ) ) {
|
2677 |
+
$default_values = array(
|
2678 |
'preview_order_id' => 'mockup',
|
2679 |
'email_type' => 'new_order',
|
2680 |
'email_templates' => 'default',
|
2683 |
'border_radius' => '3',
|
2684 |
'border_width' => '1',
|
2685 |
'border_color' => '#dedede',
|
2686 |
+
'responsive_mode' => false,
|
2687 |
'shadow' => '1',
|
2688 |
'content_width' => '600',
|
2689 |
'email_padding' => '70',
|
2693 |
'header_image_align' => 'center',
|
2694 |
'header_image_background_color' => 'transparent',
|
2695 |
'header_image_padding_top_bottom' => '0',
|
2696 |
+
'header_image_placement' => 'outside',
|
2697 |
|
2698 |
'woocommerce_waitlist_mailout_body' => __( 'Hi There,', 'kadence-woocommerce-email-designer' ),
|
2699 |
'woocommerce_waitlist_mailout_heading' => __( '{product_title} is now back in stock at {site_title}', 'kadence-woocommerce-email-designer' ),
|
2712 |
'customer_completed_switch_order_subject' => __( 'Your {site_title} order from {order_date} is complete', 'kadence-woocommerce-email-designer' ),
|
2713 |
'customer_completed_switch_order_body' => __( 'Hi there. You have successfully changed your subscription items on {site_title}. Your new order and subscription details are shown below for your reference:', 'kadence-woocommerce-email-designer' ),
|
2714 |
|
2715 |
+
'customer_renewal_invoice_heading' => __( 'Invoice for order {order_number}', 'kadence-woocommerce-email-designer' ),
|
2716 |
+
'customer_renewal_invoice_subject' => __( 'Invoice for order {order_number}', 'kadence-woocommerce-email-designer' ),
|
2717 |
+
'customer_renewal_invoice_body' => __( 'An invoice has been created for you to renew your subscription with {site_title}. To pay for this invoice please use the following link: {invoice_pay_link}', 'kadence-woocommerce-email-designer' ),
|
2718 |
+
'customer_renewal_invoice_btn_switch' => false,
|
2719 |
+
'customer_renewal_invoice_body_failed' => __( 'The automatic payment to renew your subscription with {site_title} has failed. To reactivate the subscription, please login and pay for the renewal from your account page: {invoice_pay_link}', 'kadence-woocommerce-email-designer' ),
|
2720 |
|
2721 |
|
2722 |
'cancelled_subscription_heading' => __( 'Subscription Cancelled', 'kadence-woocommerce-email-designer' ),
|
2741 |
'customer_new_account_heading' => __( 'Welcome to {site_title}', 'kadence-woocommerce-email-designer' ),
|
2742 |
'customer_note_heading' => __( 'A note has been added to your order', 'kadence-woocommerce-email-designer' ),
|
2743 |
'customer_reset_password_heading' => __( 'Password reset instructions', 'kadence-woocommerce-email-designer' ),
|
2744 |
+
'customer_reset_password_btn_switch' => false,
|
2745 |
|
2746 |
'new_order_subject' => __( '[{site_title}] New customer order ({order_number}) - {order_date}', 'kadence-woocommerce-email-designer' ),
|
2747 |
'cancelled_order_subject' => __( '[{site_title}] Cancelled order ({order_number})', 'kadence-woocommerce-email-designer' ),
|
2771 |
|
2772 |
'customer_on_hold_order_body' => __( 'Your order is on-hold until we confirm payment has been received. Your order details are shown below for your reference:', 'kadence-woocommerce-email-designer' ),
|
2773 |
'customer_invoice_switch' => true,
|
2774 |
+
'customer_invoice_btn_switch' => false,
|
2775 |
'customer_invoice_body' => __( 'An order has been created for you on {site_title}. {invoice_pay_link}', 'kadence-woocommerce-email-designer' ),
|
2776 |
'customer_invoice_body_paid' => '',
|
2777 |
'failed_order_body' => __( 'Payment for order {order_number} from {customer_full_name} has failed. The order was as follows:', 'kadence-woocommerce-email-designer' ),
|
2778 |
+
|
2779 |
+
'customer_new_account_btn_switch' => false,
|
2780 |
+
'customer_new_account_body' => __( 'Thanks for creating an account on {site_title}. Your username is {customer_username}', 'kadence-woocommerce-email-designer' ),
|
2781 |
+
'customer_note_body' => __( 'Hello, a note has just been added to your order:', 'kadence-woocommerce-email-designer' ),
|
2782 |
+
'customer_reset_password_body' => __( 'Someone requested that the password be reset for the following account:
|
2783 |
|
2784 |
Username: {customer_username}
|
2785 |
|
2854 |
'h3_color' => '#787878',
|
2855 |
'h3_font_weight' => '500',
|
2856 |
|
2857 |
+
'btn_border_width' => '0',
|
2858 |
+
'btn_border_radius' => '4',
|
2859 |
+
'btn_border_color' => '#dedede',
|
2860 |
+
'btn_font_family' => 'helvetica',
|
2861 |
+
'btn_color' => '#ffffff',
|
2862 |
+
'btn_font_weight' => '600',
|
2863 |
+
'btn_left_right_padding' => '8',
|
2864 |
+
'btn_top_bottom_padding' => '10',
|
2865 |
+
'btn_size' => '16',
|
2866 |
+
|
2867 |
+
'order_items_style' => 'normal',
|
2868 |
+
'order_items_image' => 'normal',
|
2869 |
+
'items_table_border_width' => '1',
|
2870 |
+
'items_table_border_color' => '#e4e4e4',
|
2871 |
+
'items_table_border_style' => 'solid',
|
2872 |
+
'items_table_background_color' => '',
|
2873 |
+
'items_table_background_odd_color' => '',
|
2874 |
+
'items_table_padding' => '12',
|
2875 |
+
'order_heading_style' => 'normal',
|
2876 |
+
'notes_outside_table' => false,
|
2877 |
+
|
2878 |
+
'addresses_padding' => '12',
|
2879 |
'addresses_border_width' => '1',
|
2880 |
'addresses_border_color' => '#e5e5e5',
|
2881 |
'addresses_border_style' => 'solid',
|
2908 |
'footer_credit_bottom_padding' => '0',
|
2909 |
'footer_credit_top_padding' => '0',
|
2910 |
|
2911 |
+
'items_table_border_width' => '1',
|
2912 |
+
'items_table_border_color' => '#e4e4e4',
|
2913 |
+
'footer_content_text' => get_option( 'woocommerce_email_footer_text', '' ),
|
2914 |
+
'email_recipient' => get_option( 'admin_email' ),
|
2915 |
);
|
2916 |
+
self::$default_values = apply_filters( 'kadence_woomail_email_settings_default_values', $default_values );
|
2917 |
}
|
2918 |
|
2919 |
// Return default values
|
2928 |
* @return string
|
2929 |
*/
|
2930 |
public static function get_default_value( $key ) {
|
2931 |
+
// Get default values.
|
2932 |
$default_values = self::get_default_values();
|
2933 |
|
2934 |
+
// Check if such key exists and return default value.
|
2935 |
+
return isset( $default_values[ $key ] ) ? $default_values[ $key ] : '';
|
2936 |
}
|
2937 |
|
2938 |
/**
|
2943 |
*/
|
2944 |
public static function get_border_styles() {
|
2945 |
return array(
|
2946 |
+
'none' => __( 'none', 'kadence-woocommerce-email-designer' ),
|
2947 |
+
'hidden' => __( 'hidden', 'kadence-woocommerce-email-designer' ),
|
2948 |
+
'dotted' => __( 'dotted', 'kadence-woocommerce-email-designer' ),
|
2949 |
+
'dashed' => __( 'dashed', 'kadence-woocommerce-email-designer' ),
|
2950 |
+
'solid' => __( 'solid', 'kadence-woocommerce-email-designer' ),
|
2951 |
+
'double' => __( 'double', 'kadence-woocommerce-email-designer' ),
|
2952 |
+
'groove' => __( 'groove', 'kadence-woocommerce-email-designer' ),
|
2953 |
+
'ridge' => __( 'ridge', 'kadence-woocommerce-email-designer' ),
|
2954 |
+
'inset' => __( 'inset', 'kadence-woocommerce-email-designer' ),
|
2955 |
+
'outset' => __( 'outset', 'kadence-woocommerce-email-designer' ),
|
2956 |
);
|
2957 |
}
|
2958 |
|
2964 |
*/
|
2965 |
public static function get_text_aligns() {
|
2966 |
return array(
|
2967 |
+
'left' => __( 'Left', 'kadence-woocommerce-email-designer' ),
|
2968 |
+
'center' => __( 'Center', 'kadence-woocommerce-email-designer' ),
|
2969 |
+
'right' => __( 'Right', 'kadence-woocommerce-email-designer' ),
|
2970 |
+
'justify' => __( 'Justify', 'kadence-woocommerce-email-designer' ),
|
2971 |
);
|
2972 |
}
|
2973 |
/**
|
2978 |
*/
|
2979 |
public static function get_image_aligns() {
|
2980 |
return array(
|
2981 |
+
'left' => __( 'Left', 'kadence-woocommerce-email-designer' ),
|
2982 |
+
'center' => __( 'Center', 'kadence-woocommerce-email-designer' ),
|
2983 |
+
'right' => __( 'Right', 'kadence-woocommerce-email-designer' ),
|
2984 |
);
|
2985 |
}
|
2986 |
/**
|
2991 |
*/
|
2992 |
public static function get_order_ids() {
|
2993 |
if ( is_null( self::$order_ids ) ) {
|
2994 |
+
$order_array = array();
|
2995 |
$order_array['mockup'] = __( 'Mockup Order', 'kadence-woocommerce-email-designer' );
|
2996 |
$orders = new WP_Query(
|
2997 |
array(
|
includes/class-kadence-woomail-woo.php
CHANGED
@@ -1,39 +1,47 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
// Exit if accessed directly
|
4 |
-
if (!defined('ABSPATH')) {
|
5 |
-
|
6 |
}
|
7 |
|
8 |
/**
|
9 |
* Integration with WooCommerce Settings Page
|
10 |
-
*
|
11 |
*/
|
12 |
if ( ! class_exists( 'Kadence_Woomail_Woo' ) ) {
|
13 |
-
|
|
|
|
|
14 |
class Kadence_Woomail_Woo {
|
15 |
|
16 |
/**
|
17 |
-
|
18 |
-
|
|
|
|
|
19 |
private static $instance = null;
|
20 |
|
21 |
/**
|
22 |
-
|
23 |
-
|
24 |
public static function get_instance() {
|
25 |
-
if ( is_null(
|
26 |
self::$instance = new self();
|
27 |
}
|
28 |
return self::$instance;
|
29 |
}
|
30 |
|
31 |
/**
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
public function __construct() {
|
38 |
|
39 |
// Add email Customzier setting to normal woocommerce email settings area.
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Woocommerce integration with settings.
|
4 |
+
*
|
5 |
+
* @package Kadence WooCommerce Email Designer
|
6 |
+
*/
|
7 |
|
8 |
+
// Exit if accessed directly.
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
}
|
12 |
|
13 |
/**
|
14 |
* Integration with WooCommerce Settings Page
|
|
|
15 |
*/
|
16 |
if ( ! class_exists( 'Kadence_Woomail_Woo' ) ) {
|
17 |
+
/**
|
18 |
+
* Class Kadence Woomail Woo.
|
19 |
+
*/
|
20 |
class Kadence_Woomail_Woo {
|
21 |
|
22 |
/**
|
23 |
+
* The instance Control Var.
|
24 |
+
*
|
25 |
+
* @var null
|
26 |
+
*/
|
27 |
private static $instance = null;
|
28 |
|
29 |
/**
|
30 |
+
* Instance Control
|
31 |
+
*/
|
32 |
public static function get_instance() {
|
33 |
+
if ( is_null( self::$instance ) ) {
|
34 |
self::$instance = new self();
|
35 |
}
|
36 |
return self::$instance;
|
37 |
}
|
38 |
|
39 |
/**
|
40 |
+
* Class constructor
|
41 |
+
*
|
42 |
+
* @access public
|
43 |
+
* @return void
|
44 |
+
*/
|
45 |
public function __construct() {
|
46 |
|
47 |
// Add email Customzier setting to normal woocommerce email settings area.
|
kadence-woocommerce-email-designer.php
CHANGED
@@ -3,13 +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.
|
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.
|
13 |
*
|
14 |
* @package Kadence Woocommerce Email Designer
|
15 |
*/
|
@@ -46,33 +46,40 @@ class Kadence_Woomail_Designer {
|
|
46 |
}
|
47 |
return self::$instance;
|
48 |
}
|
|
|
|
|
|
|
49 |
public function __construct() {
|
50 |
add_action( 'plugins_loaded', array( $this, 'on_plugins_loaded' ) );
|
51 |
}
|
|
|
|
|
|
|
52 |
public function on_plugins_loaded() {
|
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.
|
57 |
|
58 |
if ( ! kadence_woomail_is_woo_active() ) {
|
59 |
add_action( 'admin_notices', array( $this, 'admin_notice_need_woocommerce' ) );
|
60 |
return;
|
61 |
}
|
62 |
-
require_once KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-settings.php'; //Gets all settings
|
63 |
-
require_once KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-customizer.php'; // Gets custom customzier set up
|
64 |
-
require_once KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-import-export.php'; // Adds Customizer control
|
65 |
-
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-range-value-control.php'; // Adds Customizer control
|
66 |
-
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-kwdtemplateload-control.php'; // Adds Customizer control
|
67 |
-
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-kwdsendemail-control.php'; // Adds Customizer control
|
68 |
-
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-repeater-control.php'; // Adds Customizer control
|
69 |
-
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-kwdinfoblock-control.php'; // Adds Customizer control
|
70 |
-
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-kwdimportexport-control.php'; // Adds Customizer control
|
71 |
-
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-toggle-control.php'; // Adds customzier control
|
72 |
-
require_once KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-preview.php'; // Builds the email preview for customzier
|
73 |
require_once KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-woo.php'; // Add settings to woocommerce email settings page.
|
74 |
|
75 |
add_action( 'init', array( $this, 'on_init' ), 80 );
|
|
|
76 |
// Add admin menu.
|
77 |
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
78 |
// Get translation set up.
|
@@ -81,7 +88,6 @@ class Kadence_Woomail_Designer {
|
|
81 |
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugins_page_links' ) );
|
82 |
|
83 |
}
|
84 |
-
|
85 |
/**
|
86 |
* Trigger Load on init.
|
87 |
*/
|
@@ -254,7 +260,12 @@ class Kadence_Woomail_Designer {
|
|
254 |
} elseif ( 'customer_invoice' == $key ) {
|
255 |
if( $order->has_status( 'pending' ) ) {
|
256 |
$body_text = Kadence_Woomail_Customizer::opt( $key.'_body' );
|
257 |
-
$
|
|
|
|
|
|
|
|
|
|
|
258 |
$body_text = str_replace( '{invoice_pay_link}', $pay_link, $body_text );
|
259 |
} else {
|
260 |
$body_text = Kadence_Woomail_Customizer::opt( $key.'_body_paid' );
|
@@ -262,11 +273,21 @@ class Kadence_Woomail_Designer {
|
|
262 |
} elseif ( 'customer_renewal_invoice' == $key ) {
|
263 |
if( $order->has_status( 'pending' ) ) {
|
264 |
$body_text = Kadence_Woomail_Customizer::opt( $key.'_body' );
|
265 |
-
$
|
|
|
|
|
|
|
|
|
|
|
266 |
$body_text = str_replace( '{invoice_pay_link}', $pay_link, $body_text );
|
267 |
} else {
|
268 |
$body_text = Kadence_Woomail_Customizer::opt( $key.'_body_failed' );
|
269 |
-
$
|
|
|
|
|
|
|
|
|
|
|
270 |
$body_text = str_replace( '{invoice_pay_link}', $pay_link, $body_text );
|
271 |
}
|
272 |
} else {
|
@@ -607,8 +628,9 @@ class Kadence_Woomail_Plugin_Check {
|
|
607 |
}
|
608 |
|
609 |
}
|
610 |
-
|
|
|
|
|
611 |
function kadence_woomail_is_woo_active() {
|
612 |
return Kadence_Woomail_Plugin_Check::active_check_woo();
|
613 |
}
|
614 |
-
|
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.3.0
|
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.7.0
|
13 |
*
|
14 |
* @package Kadence Woocommerce Email Designer
|
15 |
*/
|
46 |
}
|
47 |
return self::$instance;
|
48 |
}
|
49 |
+
/**
|
50 |
+
* Construct
|
51 |
+
*/
|
52 |
public function __construct() {
|
53 |
add_action( 'plugins_loaded', array( $this, 'on_plugins_loaded' ) );
|
54 |
}
|
55 |
+
/**
|
56 |
+
* Function on plugins loaded
|
57 |
+
*/
|
58 |
public function on_plugins_loaded() {
|
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.0' );
|
63 |
|
64 |
if ( ! kadence_woomail_is_woo_active() ) {
|
65 |
add_action( 'admin_notices', array( $this, 'admin_notice_need_woocommerce' ) );
|
66 |
return;
|
67 |
}
|
68 |
+
require_once KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-settings.php'; //Gets all settings.
|
69 |
+
require_once KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-customizer.php'; // Gets custom customzier set up.
|
70 |
+
require_once KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-import-export.php'; // Adds Customizer control.
|
71 |
+
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-range-value-control.php'; // Adds Customizer control.
|
72 |
+
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-kwdtemplateload-control.php'; // Adds Customizer control.
|
73 |
+
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-kwdsendemail-control.php'; // Adds Customizer control.
|
74 |
+
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-repeater-control.php'; // Adds Customizer control.
|
75 |
+
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-kwdinfoblock-control.php'; // Adds Customizer control.
|
76 |
+
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-kwdimportexport-control.php'; // Adds Customizer control.
|
77 |
+
require_once KT_WOOMAIL_PATH . 'includes/class-customizer-toggle-control.php'; // Adds customzier control.
|
78 |
+
require_once KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-preview.php'; // Builds the email preview for customzier.
|
79 |
require_once KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-woo.php'; // Add settings to woocommerce email settings page.
|
80 |
|
81 |
add_action( 'init', array( $this, 'on_init' ), 80 );
|
82 |
+
|
83 |
// Add admin menu.
|
84 |
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
85 |
// Get translation set up.
|
88 |
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugins_page_links' ) );
|
89 |
|
90 |
}
|
|
|
91 |
/**
|
92 |
* Trigger Load on init.
|
93 |
*/
|
260 |
} elseif ( 'customer_invoice' == $key ) {
|
261 |
if( $order->has_status( 'pending' ) ) {
|
262 |
$body_text = Kadence_Woomail_Customizer::opt( $key.'_body' );
|
263 |
+
$btn_switch = Kadence_Woomail_Customizer::opt( $key . '_btn_switch' );
|
264 |
+
if ( true == $btn_switch ) {
|
265 |
+
$pay_link = '<p class="btn-container"><a class="btn" href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay for this order', 'kadence-woocommerce-email-designer' ) . '</a></p>';
|
266 |
+
} else {
|
267 |
+
$pay_link = '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay for this order', 'kadence-woocommerce-email-designer' ) . '</a>';
|
268 |
+
}
|
269 |
$body_text = str_replace( '{invoice_pay_link}', $pay_link, $body_text );
|
270 |
} else {
|
271 |
$body_text = Kadence_Woomail_Customizer::opt( $key.'_body_paid' );
|
273 |
} elseif ( 'customer_renewal_invoice' == $key ) {
|
274 |
if( $order->has_status( 'pending' ) ) {
|
275 |
$body_text = Kadence_Woomail_Customizer::opt( $key.'_body' );
|
276 |
+
$btn_switch = Kadence_Woomail_Customizer::opt( $key . '_btn_switch' );
|
277 |
+
if ( true == $btn_switch ) {
|
278 |
+
$pay_link = '<p class="btn-container"><a class="btn" href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay Now »', 'kadence-woocommerce-email-designer' ) . '</a></p>';
|
279 |
+
} else {
|
280 |
+
$pay_link = '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay Now »', 'kadence-woocommerce-email-designer' ) . '</a>';
|
281 |
+
}
|
282 |
$body_text = str_replace( '{invoice_pay_link}', $pay_link, $body_text );
|
283 |
} else {
|
284 |
$body_text = Kadence_Woomail_Customizer::opt( $key.'_body_failed' );
|
285 |
+
$btn_switch = Kadence_Woomail_Customizer::opt( $key . '_btn_switch' );
|
286 |
+
if ( true == $btn_switch ) {
|
287 |
+
$pay_link = '<p class="btn-container"><a class="btn" href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay Now »', 'kadence-woocommerce-email-designer' ) . '</a></p>';
|
288 |
+
} else {
|
289 |
+
$pay_link = '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay Now »', 'kadence-woocommerce-email-designer' ) . '</a>';
|
290 |
+
}
|
291 |
$body_text = str_replace( '{invoice_pay_link}', $pay_link, $body_text );
|
292 |
}
|
293 |
} else {
|
628 |
}
|
629 |
|
630 |
}
|
631 |
+
/**
|
632 |
+
* Checks if WooCommerce is enabled
|
633 |
+
*/
|
634 |
function kadence_woomail_is_woo_active() {
|
635 |
return Kadence_Woomail_Plugin_Check::active_check_woo();
|
636 |
}
|
|
preview.php
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* View for email preview
|
|
|
|
|
5 |
*/
|
6 |
|
7 |
-
// Exit if accessed directly
|
8 |
-
if (!defined('ABSPATH')) {
|
9 |
-
|
10 |
}
|
11 |
|
12 |
?>
|
13 |
-
|
14 |
<!DOCTYPE html>
|
15 |
<!--[if IE 7]>
|
16 |
<html class="ie ie7" <?php language_attributes(); ?>>
|
@@ -22,29 +22,30 @@ if (!defined('ABSPATH')) {
|
|
22 |
<html <?php language_attributes(); ?>>
|
23 |
<!--<![endif]-->
|
24 |
|
25 |
-
|
26 |
|
27 |
-
|
28 |
-
|
29 |
|
30 |
-
|
31 |
|
32 |
-
|
33 |
|
34 |
-
|
35 |
|
36 |
-
|
37 |
|
38 |
-
|
39 |
|
40 |
-
|
41 |
|
42 |
-
|
43 |
|
44 |
<?php
|
45 |
do_action( 'woomail_footer' );
|
46 |
-
wp_footer();
|
|
|
47 |
|
48 |
-
|
49 |
|
50 |
-
</html>
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* View for email preview
|
4 |
+
*
|
5 |
+
* @package Kadence Woocommerce Email Designer
|
6 |
*/
|
7 |
|
8 |
+
// Exit if accessed directly.
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
}
|
12 |
|
13 |
?>
|
|
|
14 |
<!DOCTYPE html>
|
15 |
<!--[if IE 7]>
|
16 |
<html class="ie ie7" <?php language_attributes(); ?>>
|
22 |
<html <?php language_attributes(); ?>>
|
23 |
<!--<![endif]-->
|
24 |
|
25 |
+
<head>
|
26 |
|
27 |
+
<meta charset="<?php bloginfo( 'charset' ); ?>" />
|
28 |
+
<meta name="viewport" content="width=device-width" />
|
29 |
|
30 |
+
<title><?php echo __( 'Email Designer', 'kadence-woocommerce-email-designer' ); ?></title>
|
31 |
|
32 |
+
<style type="text/css" id="kadence_woomail_designer_custom_css"><?php echo Kadence_Woomail_Customizer::opt( 'custom_css' ); ?>.woocommerce-store-notice.demo_store, .mfp-hide {display: none;}</style>
|
33 |
|
34 |
+
</head>
|
35 |
|
36 |
+
<body>
|
37 |
|
38 |
+
<div id="kt_woomail_preview_wrapper" style="display: block;">
|
39 |
|
40 |
+
<?php Kadence_Woomail_Preview::print_preview_email(); ?>
|
41 |
|
42 |
+
</div>
|
43 |
|
44 |
<?php
|
45 |
do_action( 'woomail_footer' );
|
46 |
+
wp_footer();
|
47 |
+
?>
|
48 |
|
49 |
+
</body>
|
50 |
|
51 |
+
</html>
|
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: 5.2.2
|
8 |
-
Stable tag: 1.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -60,6 +60,16 @@ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
|
|
60 |
|
61 |
== Changelog ==
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
= 1.2.2 =
|
64 |
* Update: Prevent errors from breaking emails when 3rd party plugins are doing it wrong.
|
65 |
* Update: Woocommerce subscriptions template translation string.
|
5 |
Requires PHP: 5.2.4
|
6 |
Requires at least: 4.4
|
7 |
Tested up to: 5.2.2
|
8 |
+
Stable tag: 1.3.0
|
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.0 =
|
64 |
+
* ADD: Fluid/Responsive Setting
|
65 |
+
* ADD: Inner Max width Setting
|
66 |
+
* ADD: Additional Content
|
67 |
+
* ADD: Address Padding
|
68 |
+
* ADD: Button Styles ( Plus options for some links to be buttons ).
|
69 |
+
* UPDATE: All tempaltes updated for WC 3.7
|
70 |
+
* Update: Table Padding now has left and right seperate from top and bottom padding.
|
71 |
+
* Update: Container border has top, right, bottom, left width options.
|
72 |
+
|
73 |
= 1.2.2 =
|
74 |
* Update: Prevent errors from breaking emails when 3rd party plugins are doing it wrong.
|
75 |
* Update: Woocommerce subscriptions template translation string.
|
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 3.
|
17 |
*/
|
18 |
|
19 |
/**
|
@@ -36,26 +36,33 @@ do_action( 'woocommerce_email_header', $email_heading, $email );
|
|
36 |
*/
|
37 |
do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.7.0
|
17 |
*/
|
18 |
|
19 |
/**
|
36 |
*/
|
37 |
do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
|
38 |
|
39 |
+
/**
|
40 |
+
* @hooked WC_Emails::order_details() Shows the order details table.
|
41 |
+
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
42 |
+
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
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 additonal content - this is set in each email's settings.
|
60 |
+
*/
|
61 |
+
if ( isset( $additional_content ) && ! empty( $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/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 3.
|
17 |
*/
|
18 |
|
19 |
/**
|
@@ -55,6 +55,13 @@ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $pl
|
|
55 |
*/
|
56 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
/**
|
59 |
* @hooked WC_Emails::email_footer() Output the email footer
|
60 |
*/
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.7.0
|
17 |
*/
|
18 |
|
19 |
/**
|
55 |
*/
|
56 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
57 |
|
58 |
+
/**
|
59 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
60 |
+
*/
|
61 |
+
if ( isset( $additional_content ) && ! empty( $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 |
*/
|
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 3.
|
17 |
*/
|
18 |
|
19 |
/**
|
@@ -55,6 +55,13 @@ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $pl
|
|
55 |
*/
|
56 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
/**
|
59 |
* @hooked WC_Emails::email_footer() Output the email footer
|
60 |
*/
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails/HTML
|
16 |
+
* @version 3.7.0
|
17 |
*/
|
18 |
|
19 |
/**
|
55 |
*/
|
56 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
57 |
|
58 |
+
/**
|
59 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
60 |
+
*/
|
61 |
+
if ( isset( $additional_content ) && ! empty( $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 |
*/
|
templates/woo/emails/admin-new-renewal-order.php
CHANGED
@@ -33,5 +33,12 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|
33 |
|
34 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
do_action( 'woocommerce_email_footer', $email );
|
37 |
?>
|
33 |
|
34 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
35 |
|
36 |
+
/**
|
37 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
38 |
+
*/
|
39 |
+
if ( isset( $additional_content ) && ! empty( $additional_content ) ) {
|
40 |
+
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
41 |
+
}
|
42 |
+
|
43 |
do_action( 'woocommerce_email_footer', $email );
|
44 |
?>
|
templates/woo/emails/cancelled-subscription.php
CHANGED
@@ -6,65 +6,115 @@
|
|
6 |
* @package WooCommerce_Subscriptions/Templates/Emails
|
7 |
* @version 2.1.0
|
8 |
*/
|
|
|
9 |
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit; // Exit if accessed directly
|
11 |
}
|
12 |
|
13 |
/**
|
14 |
-
* NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
|
15 |
* 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
|
16 |
* 2. Remove static main text area.
|
17 |
*/
|
|
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
<?php do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
22 |
|
23 |
-
<?php
|
24 |
/**
|
|
|
|
|
25 |
* @hooked Kadence_Woomail_Designer::email_main_text_area
|
26 |
*/
|
27 |
do_action( 'kadence_woomail_designer_email_details', $subscription, $sent_to_admin, $plain_text, $email );
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
|
32 |
-
<thead>
|
33 |
-
<tr>
|
34 |
-
<th class="td" scope="col" style="text-align:left;"><?php esc_html_e( 'Subscription', 'kadence-woocommerce-email-designer' ); ?></th>
|
35 |
-
<th class="td" scope="col" style="text-align:left;"><?php echo esc_html_x( 'Price', 'table headings in notification email', 'kadence-woocommerce-email-designer' ); ?></th>
|
36 |
-
<th class="td" scope="col" style="text-align:left;"><?php echo esc_html_x( 'Last Order Date', 'table heading', 'kadence-woocommerce-email-designer' ); ?></th>
|
37 |
-
<th class="td" scope="col" style="text-align:left;"><?php echo esc_html_x( 'End of Prepaid Term', 'table headings in notification email', 'kadence-woocommerce-email-designer' ); ?></th>
|
38 |
-
</tr>
|
39 |
-
</thead>
|
40 |
-
<tbody>
|
41 |
-
<tr>
|
42 |
-
<td class="td" width="1%" style="text-align:left; vertical-align:middle;">
|
43 |
-
<a href="<?php echo esc_url( wcs_get_edit_post_link( $subscription->get_id() ) ); ?>">#<?php echo esc_html( $subscription->get_order_number() ); ?></a>
|
44 |
-
</td>
|
45 |
-
<td class="td" style="text-align:left; vertical-align:middle;">
|
46 |
-
<?php echo wp_kses_post( $subscription->get_formatted_order_total() ); ?>
|
47 |
-
</td>
|
48 |
-
<td class="td" style="text-align:left; vertical-align:middle;">
|
49 |
-
<?php
|
50 |
-
$last_order_time_created = $subscription->get_time( 'last_order_date_created', 'site' );
|
51 |
-
if ( ! empty( $last_order_time_created ) ) {
|
52 |
-
echo esc_html( date_i18n( wc_date_format(), $last_order_time_created ) );
|
53 |
-
} else {
|
54 |
-
esc_html_e( '-', 'kadence-woocommerce-email-designer' );
|
55 |
-
}
|
56 |
-
?>
|
57 |
-
</td>
|
58 |
-
<td class="td" style="text-align:left; vertical-align:middle;">
|
59 |
-
<?php echo esc_html( date_i18n( wc_date_format(), $subscription->get_time( 'end', 'site' ) ) ); ?>
|
60 |
-
</td>
|
61 |
-
</tr>
|
62 |
-
</tbody>
|
63 |
-
</table>
|
64 |
-
<br/>
|
65 |
|
66 |
-
|
67 |
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
-
|
|
6 |
* @package WooCommerce_Subscriptions/Templates/Emails
|
7 |
* @version 2.1.0
|
8 |
*/
|
9 |
+
|
10 |
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit; // Exit if accessed directly.
|
12 |
}
|
13 |
|
14 |
/**
|
15 |
+
* NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
|
16 |
* 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
|
17 |
* 2. Remove static main text area.
|
18 |
*/
|
19 |
+
$responsive_check = Kadence_Woomail_Customizer::opt( 'responsive_mode' );
|
20 |
|
21 |
+
do_action( 'woocommerce_email_header', $email_heading, $email );
|
|
|
|
|
22 |
|
|
|
23 |
/**
|
24 |
+
* Kadence Email Details
|
25 |
+
*
|
26 |
* @hooked Kadence_Woomail_Designer::email_main_text_area
|
27 |
*/
|
28 |
do_action( 'kadence_woomail_designer_email_details', $subscription, $sent_to_admin, $plain_text, $email );
|
29 |
|
30 |
+
if ( true == $responsive_check ) {
|
31 |
+
?>
|
32 |
+
<div style="margin-bottom: 40px;">
|
33 |
+
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%;" border="1">
|
34 |
+
<tbody>
|
35 |
+
<tr>
|
36 |
+
<td class="td" scope="row" style="text-align:<?php echo esc_attr( $text_align ); ?>;">
|
37 |
+
<p style="margin-bottom: 0"><strong><?php esc_html_e( 'Subscription', 'kadence-woocommerce-email-designer' ); ?></strong></p>
|
38 |
+
<p style="margin-bottom: 0"><a href="<?php echo esc_url( wcs_get_edit_post_link( $subscription->get_id() ) ); ?>">#<?php echo esc_html( $subscription->get_order_number() ); ?></a></p>
|
39 |
+
</td>
|
40 |
+
<td class="td" scope="row" style="text-align:<?php echo esc_attr( $text_align ); ?>;">
|
41 |
+
<p style="margin-bottom: 0"><strong><?php echo esc_html_x( 'Price', 'table heading', 'kadence-woocommerce-email-designer' ); ?></strong></p>
|
42 |
+
<p style="margin-bottom: 0"><?php echo wp_kses_post( $subscription->get_formatted_order_total() ); ?></p>
|
43 |
+
</td>
|
44 |
+
</tr>
|
45 |
+
<tr>
|
46 |
+
<td class="td" scope="row" style="text-align:<?php echo esc_attr( $text_align ); ?>;">
|
47 |
+
<p style="margin-bottom: 0"><strong><?php echo esc_html_x( 'Last Order Date', 'table heading', 'kadence-woocommerce-email-designer' ); ?></strong></p>
|
48 |
+
<p style="margin-bottom: 0">
|
49 |
+
<?php
|
50 |
+
$last_order_time_created = $subscription->get_time( 'last_order_date_created', 'site' );
|
51 |
+
if ( ! empty( $last_order_time_created ) ) {
|
52 |
+
echo esc_html( date_i18n( wc_date_format(), $last_order_time_created ) );
|
53 |
+
} else {
|
54 |
+
esc_html_e( '-', 'kadence-woocommerce-email-designer' );
|
55 |
+
}
|
56 |
+
?>
|
57 |
+
</p>
|
58 |
+
</td>
|
59 |
+
<td class="td" scope="row" style="text-align:<?php echo esc_attr( $text_align ); ?>;">
|
60 |
+
<p style="margin-bottom: 0"><strong><?php echo esc_html_x( 'End of Prepaid Term', 'table heading', 'kadence-woocommerce-email-designer' ); ?></strong></p>
|
61 |
+
<p style="margin-bottom: 0"><?php echo esc_html( date_i18n( wc_date_format(), $subscription->get_time( 'end', 'site' ) ) ); ?></p>
|
62 |
+
</td>
|
63 |
+
</tr>
|
64 |
+
</tbody>
|
65 |
+
</table>
|
66 |
+
</div>
|
67 |
+
<?php
|
68 |
+
} else {
|
69 |
+
?>
|
70 |
+
<div style="margin-bottom: 40px;">
|
71 |
+
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%;" border="1">
|
72 |
+
<thead>
|
73 |
+
<tr>
|
74 |
+
<th class="td" scope="col" style="text-align:left;"><?php esc_html_e( 'Subscription', 'kadence-woocommerce-email-designer' ); ?></th>
|
75 |
+
<th class="td" scope="col" style="text-align:left;"><?php echo esc_html_x( 'Price', 'table headings in notification email', 'kadence-woocommerce-email-designer' ); ?></th>
|
76 |
+
<th class="td" scope="col" style="text-align:left;"><?php echo esc_html_x( 'Last Order Date', 'table heading', 'kadence-woocommerce-email-designer' ); ?></th>
|
77 |
+
<th class="td" scope="col" style="text-align:left;"><?php echo esc_html_x( 'End of Prepaid Term', 'table headings in notification email', 'kadence-woocommerce-email-designer' ); ?></th>
|
78 |
+
</tr>
|
79 |
+
</thead>
|
80 |
+
<tbody>
|
81 |
+
<tr>
|
82 |
+
<td class="td" width="1%" style="text-align:left; vertical-align:middle;">
|
83 |
+
<a href="<?php echo esc_url( wcs_get_edit_post_link( $subscription->get_id() ) ); ?>">#<?php echo esc_html( $subscription->get_order_number() ); ?></a>
|
84 |
+
</td>
|
85 |
+
<td class="td" style="text-align:left; vertical-align:middle;">
|
86 |
+
<?php echo wp_kses_post( $subscription->get_formatted_order_total() ); ?>
|
87 |
+
</td>
|
88 |
+
<td class="td" style="text-align:left; vertical-align:middle;">
|
89 |
+
<?php
|
90 |
+
$last_order_time_created = $subscription->get_time( 'last_order_date_created', 'site' );
|
91 |
+
if ( ! empty( $last_order_time_created ) ) {
|
92 |
+
echo esc_html( date_i18n( wc_date_format(), $last_order_time_created ) );
|
93 |
+
} else {
|
94 |
+
esc_html_e( '-', 'kadence-woocommerce-email-designer' );
|
95 |
+
}
|
96 |
+
?>
|
97 |
+
</td>
|
98 |
+
<td class="td" style="text-align:left; vertical-align:middle;">
|
99 |
+
<?php echo esc_html( date_i18n( wc_date_format(), $subscription->get_time( 'end', 'site' ) ) ); ?>
|
100 |
+
</td>
|
101 |
+
</tr>
|
102 |
+
</tbody>
|
103 |
+
</table>
|
104 |
+
</div>
|
105 |
+
<?php
|
106 |
+
}
|
107 |
|
108 |
+
do_action( 'woocommerce_subscriptions_email_order_details', $subscription, $sent_to_admin, $plain_text, $email );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
+
do_action( 'woocommerce_email_customer_details', $subscription, $sent_to_admin, $plain_text, $email );
|
111 |
|
112 |
+
/**
|
113 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
114 |
+
*/
|
115 |
+
if ( isset( $additional_content ) && ! empty( $additional_content ) ) {
|
116 |
+
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
117 |
+
}
|
118 |
|
119 |
+
do_action( 'woocommerce_email_footer', $email );
|
120 |
+
?>
|
templates/woo/emails/customer-completed-order.php
CHANGED
@@ -55,6 +55,13 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|
55 |
*/
|
56 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
/**
|
59 |
* @hooked WC_Emails::email_footer() Output the email footer
|
60 |
*/
|
55 |
*/
|
56 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
57 |
|
58 |
+
/**
|
59 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
60 |
+
*/
|
61 |
+
if ( isset( $additional_content ) && ! empty( $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 |
*/
|
templates/woo/emails/customer-completed-renewal-order.php
CHANGED
@@ -32,6 +32,15 @@ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $pl
|
|
32 |
|
33 |
<?php do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); ?>
|
34 |
|
35 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
-
|
|
32 |
|
33 |
<?php do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); ?>
|
34 |
|
35 |
+
<?php
|
36 |
+
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
40 |
+
*/
|
41 |
+
if ( isset( $additional_content ) && ! empty( $additional_content ) ) {
|
42 |
+
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
43 |
+
}
|
44 |
|
45 |
+
do_action( 'woocommerce_email_footer', $email );
|
46 |
+
?>
|
templates/woo/emails/customer-completed-switch-order.php
CHANGED
@@ -36,6 +36,15 @@ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $pl
|
|
36 |
<?php do_action( 'woocommerce_subscriptions_email_order_details', $subscription, $sent_to_admin, $plain_text, $email ); ?>
|
37 |
<?php endforeach; ?>
|
38 |
|
39 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
-
|
|
36 |
<?php do_action( 'woocommerce_subscriptions_email_order_details', $subscription, $sent_to_admin, $plain_text, $email ); ?>
|
37 |
<?php endforeach; ?>
|
38 |
|
39 |
+
<?php
|
40 |
+
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
44 |
+
*/
|
45 |
+
if ( isset( $additional_content ) && ! empty( $additional_content ) ) {
|
46 |
+
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
47 |
+
}
|
48 |
|
49 |
+
do_action( 'woocommerce_email_footer', $email );
|
50 |
+
?>
|
templates/woo/emails/customer-invoice.php
CHANGED
@@ -13,11 +13,11 @@
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
-
* @version 3.
|
17 |
*/
|
18 |
|
19 |
/**
|
20 |
-
* NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER
|
21 |
* 1. add hook 'kadence_woomail_designer_email_text' to pull in main text
|
22 |
* 2. Remove static main text area.
|
23 |
*/
|
@@ -33,8 +33,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
33 |
*/
|
34 |
do_action( 'woocommerce_email_header', $email_heading, $email );
|
35 |
|
36 |
-
|
37 |
/**
|
|
|
|
|
38 |
* @hooked Kadence_Woomail_Designer::email_main_text_area
|
39 |
*/
|
40 |
do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
|
@@ -65,6 +66,13 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|
65 |
*/
|
66 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
/**
|
69 |
* Executes the email footer.
|
70 |
*
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.7.0
|
17 |
*/
|
18 |
|
19 |
/**
|
20 |
+
* NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER.
|
21 |
* 1. add hook 'kadence_woomail_designer_email_text' to pull in main text
|
22 |
* 2. Remove static main text area.
|
23 |
*/
|
33 |
*/
|
34 |
do_action( 'woocommerce_email_header', $email_heading, $email );
|
35 |
|
|
|
36 |
/**
|
37 |
+
* Add Main Email Text
|
38 |
+
*
|
39 |
* @hooked Kadence_Woomail_Designer::email_main_text_area
|
40 |
*/
|
41 |
do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
|
66 |
*/
|
67 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
68 |
|
69 |
+
/**
|
70 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
71 |
+
*/
|
72 |
+
if ( isset( $additional_content ) && ! empty( $additional_content ) ) {
|
73 |
+
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
74 |
+
}
|
75 |
+
|
76 |
/**
|
77 |
* Executes the email footer.
|
78 |
*
|
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 3.
|
17 |
*/
|
18 |
|
19 |
/**
|
@@ -26,9 +26,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
26 |
exit; // Exit if accessed directly
|
27 |
}
|
28 |
|
29 |
-
|
30 |
|
31 |
-
|
32 |
|
33 |
/**
|
34 |
* @hooked Kadence_Woomail_Designer::email_main_text_area_no_order
|
@@ -39,8 +39,22 @@ do_action( 'kadence_woomail_designer_email_text', $email ); ?>
|
|
39 |
|
40 |
<p><?php printf( __( 'Your password has been automatically generated: %s', 'kadence-woocommerce-email-designer' ), '<strong>' . esc_html( $user_pass ) . '</strong>' ); ?></p>
|
41 |
|
42 |
-
<?php
|
|
|
43 |
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
-
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.7.0
|
17 |
*/
|
18 |
|
19 |
/**
|
26 |
exit; // Exit if accessed directly
|
27 |
}
|
28 |
|
29 |
+
do_action( 'woocommerce_email_header', $email_heading, $email );
|
30 |
|
31 |
+
$button_check = Kadence_Woomail_Customizer::opt( 'customer_new_account_btn_switch' );
|
32 |
|
33 |
/**
|
34 |
* @hooked Kadence_Woomail_Designer::email_main_text_area_no_order
|
39 |
|
40 |
<p><?php printf( __( 'Your password has been automatically generated: %s', 'kadence-woocommerce-email-designer' ), '<strong>' . esc_html( $user_pass ) . '</strong>' ); ?></p>
|
41 |
|
42 |
+
<?php
|
43 |
+
endif;
|
44 |
|
45 |
+
if ( true == $button_check ) {
|
46 |
+
echo '<p>' . esc_html( 'You can access your account area to view your orders and change your password.', 'kadence-woocommerce-email-designer' ) . '</p>';
|
47 |
+
echo '<p class="btn-container"><a href="' . esc_url( wc_get_page_permalink( 'myaccount' ) ) . '" class="btn">' . esc_html( 'View Account', 'kadence-woocommerce-email-designer' ) . '</a></p>';
|
48 |
+
} else {
|
49 |
+
?>
|
50 |
+
<p><?php printf( __( 'You can access your account area to view your orders and change your password here: %s.', 'kadence-woocommerce-email-designer' ), make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); ?></p>
|
51 |
+
<?php
|
52 |
+
}
|
53 |
+
/**
|
54 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
55 |
+
*/
|
56 |
+
if ( isset( $additional_content ) && ! empty( $additional_content ) ) {
|
57 |
+
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
58 |
+
}
|
59 |
|
60 |
+
do_action( 'woocommerce_email_footer', $email );
|
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 |
/**
|
@@ -61,6 +61,13 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|
61 |
*/
|
62 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
/**
|
65 |
* @hooked WC_Emails::email_footer() Output the email footer
|
66 |
*/
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.7.0
|
17 |
*/
|
18 |
|
19 |
/**
|
61 |
*/
|
62 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
63 |
|
64 |
+
/**
|
65 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
66 |
+
*/
|
67 |
+
if ( isset( $additional_content ) && ! empty( $additional_content ) ) {
|
68 |
+
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
69 |
+
}
|
70 |
+
|
71 |
/**
|
72 |
* @hooked WC_Emails::email_footer() Output the email footer
|
73 |
*/
|
templates/woo/emails/customer-on-hold-order.php
CHANGED
@@ -55,6 +55,13 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|
55 |
*/
|
56 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
/**
|
59 |
* @hooked WC_Emails::email_footer() Output the email footer
|
60 |
*/
|
55 |
*/
|
56 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
57 |
|
58 |
+
/**
|
59 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
60 |
+
*/
|
61 |
+
if ( isset( $additional_content ) && ! empty( $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 |
*/
|
templates/woo/emails/customer-processing-order.php
CHANGED
@@ -55,6 +55,13 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|
55 |
*/
|
56 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
/**
|
59 |
* @hooked WC_Emails::email_footer() Output the email footer
|
60 |
*/
|
55 |
*/
|
56 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
57 |
|
58 |
+
/**
|
59 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
60 |
+
*/
|
61 |
+
if ( isset( $additional_content ) && ! empty( $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 |
*/
|
templates/woo/emails/customer-processing-renewal-order.php
CHANGED
@@ -33,6 +33,15 @@ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $pl
|
|
33 |
|
34 |
<?php do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); ?>
|
35 |
|
36 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
-
|
33 |
|
34 |
<?php do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); ?>
|
35 |
|
36 |
+
<?php
|
37 |
+
|
38 |
+
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
42 |
+
*/
|
43 |
+
if ( isset( $additional_content ) && ! empty( $additional_content ) ) {
|
44 |
+
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
45 |
+
}
|
46 |
|
47 |
+
do_action( 'woocommerce_email_footer', $email ); ?>
|
templates/woo/emails/customer-refunded-order.php
CHANGED
@@ -55,6 +55,13 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|
55 |
*/
|
56 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
/**
|
59 |
* @hooked WC_Emails::email_footer() Output the email footer
|
60 |
*/
|
55 |
*/
|
56 |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
57 |
|
58 |
+
/**
|
59 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
60 |
+
*/
|
61 |
+
if ( isset( $additional_content ) && ! empty( $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 |
*/
|
templates/woo/emails/customer-renewal-invoice.php
CHANGED
@@ -29,6 +29,14 @@ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $pl
|
|
29 |
|
30 |
?>
|
31 |
|
32 |
-
<?php do_action( 'woocommerce_subscriptions_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
?>
|
31 |
|
32 |
+
<?php do_action( 'woocommerce_subscriptions_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
33 |
|
34 |
+
/**
|
35 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
36 |
+
*/
|
37 |
+
if ( isset( $additional_content ) && ! empty( $additional_content ) ) {
|
38 |
+
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
do_action( 'woocommerce_email_footer', $email );
|
42 |
+
?>
|
templates/woo/emails/customer-reset-password.php
CHANGED
@@ -26,17 +26,34 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
26 |
exit; // Exit if accessed directly
|
27 |
}
|
28 |
|
|
|
|
|
29 |
do_action( 'woocommerce_email_header', $email_heading, $email );
|
30 |
|
31 |
/**
|
32 |
* @hooked Kadence_Woomail_Designer::email_main_text_area_no_order
|
33 |
*/
|
34 |
-
do_action( 'kadence_woomail_designer_email_text', $email );
|
35 |
|
36 |
-
|
37 |
-
<
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
<p></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
-
|
|
26 |
exit; // Exit if accessed directly
|
27 |
}
|
28 |
|
29 |
+
$button_check = Kadence_Woomail_Customizer::opt( 'customer_reset_password_btn_switch' );
|
30 |
+
|
31 |
do_action( 'woocommerce_email_header', $email_heading, $email );
|
32 |
|
33 |
/**
|
34 |
* @hooked Kadence_Woomail_Designer::email_main_text_area_no_order
|
35 |
*/
|
36 |
+
do_action( 'kadence_woomail_designer_email_text', $email );
|
37 |
|
38 |
+
if ( true == $button_check ) {
|
39 |
+
echo '<p class="btn-container"><a href="' . esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ) . '" class="btn">' . esc_html( 'Reset Password', 'kadence-woocommerce-email-designer' ) . '</a></p>';
|
40 |
+
} else {
|
41 |
+
?>
|
42 |
+
<p>
|
43 |
+
<a class="link" href="<?php echo esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ); ?>">
|
44 |
+
<?php esc_html_e( 'Click here to reset your password', 'kadence-woocommerce-email-designer' ); ?></a>
|
45 |
+
</p>
|
46 |
+
<?php
|
47 |
+
}
|
48 |
+
?>
|
49 |
<p></p>
|
50 |
+
<?php
|
51 |
+
/**
|
52 |
+
* Show user-defined additonal content - this is set in each email's settings.
|
53 |
+
*/
|
54 |
+
if ( isset( $additional_content ) && ! empty( $additional_content ) ) {
|
55 |
+
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
56 |
+
}
|
57 |
|
58 |
+
do_action( 'woocommerce_email_footer', $email );
|
59 |
+
?>
|
templates/woo/emails/email-addresses.php
CHANGED
@@ -13,13 +13,13 @@
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
-
* @version 3.
|
17 |
*/
|
18 |
|
19 |
/**
|
20 |
* EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
|
21 |
*
|
22 |
-
*
|
23 |
*/
|
24 |
|
25 |
|
@@ -27,36 +27,105 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
27 |
exit;
|
28 |
}
|
29 |
|
30 |
-
$text_align
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
<td style="text-align:<?php echo $text_align; ?>;" valign="top" width="50%">
|
56 |
-
<h2><?php
|
57 |
|
58 |
-
<address class="address"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
</td>
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates/Emails
|
16 |
+
* @version 3.5.4
|
17 |
*/
|
18 |
|
19 |
/**
|
20 |
* EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
|
21 |
*
|
22 |
+
* Add support for responsive email.
|
23 |
*/
|
24 |
|
25 |
|
27 |
exit;
|
28 |
}
|
29 |
|
30 |
+
$text_align = is_rtl() ? 'right' : 'left';
|
31 |
+
$address = $order->get_formatted_billing_address();
|
32 |
+
$shipping = $order->get_formatted_shipping_address();
|
33 |
+
$responsive_check = Kadence_Woomail_Customizer::opt( 'responsive_mode' );
|
34 |
+
if ( true == $responsive_check ) {
|
35 |
+
?>
|
36 |
+
<table id="addresses" cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top; margin-bottom: 40px; padding:0;" border="0">
|
37 |
+
<tr>
|
38 |
+
<td style="text-align:<?php echo esc_attr( $text_align ); ?>; border:0;" valign="top">
|
39 |
+
<h2><?php esc_html_e( 'Billing address', 'kadence-woocommerce-email-designer' ); ?></h2>
|
40 |
|
41 |
+
<address class="address">
|
42 |
+
<table cellspacing="0" cellpadding="0" style="width: 100%; padding:0;" border="0">
|
43 |
+
<tr>
|
44 |
+
<td class="address-td" valign="top">
|
45 |
+
<?php echo wp_kses_post( $address ? $address : esc_html__( 'N/A', 'kadence-woocommerce-email-designer' ) ); ?>
|
46 |
+
<?php
|
47 |
+
// Adds in support for plugin.
|
48 |
+
if ( ! class_exists( 'APG_Campo_NIF' ) ) {
|
49 |
+
if ( $order->get_billing_phone() ) :
|
50 |
+
?>
|
51 |
+
<br/><?php echo esc_html( $order->get_billing_phone() ); ?>
|
52 |
+
<?php endif; ?>
|
53 |
+
<?php if ( $order->get_billing_email() ) : ?>
|
54 |
+
<p><?php echo esc_html( $order->get_billing_email() ); ?></p>
|
55 |
+
<?php
|
56 |
+
endif;
|
57 |
+
}
|
58 |
+
?>
|
59 |
+
</td>
|
60 |
+
</tr>
|
61 |
+
</table>
|
62 |
+
</address>
|
63 |
+
</td>
|
64 |
+
</tr>
|
65 |
+
<?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && $shipping ) : ?>
|
66 |
+
<tr>
|
67 |
+
<td style="text-align:<?php echo esc_attr( $text_align ); ?>;" valign="top">
|
68 |
+
<h2><?php esc_html_e( 'Shipping address', 'kadence-woocommerce-email-designer' ); ?></h2>
|
69 |
|
70 |
+
<address class="address">
|
71 |
+
<table cellspacing="0" cellpadding="0" style="width: 100%; padding:0;" border="0">
|
72 |
+
<tr>
|
73 |
+
<td class="address-td" valign="top">
|
74 |
+
<?php echo wp_kses_post( $shipping ); ?>
|
75 |
+
</td>
|
76 |
+
</tr>
|
77 |
+
</table>
|
78 |
+
</address>
|
79 |
+
</td>
|
80 |
+
</tr>
|
81 |
+
<?php endif; ?>
|
82 |
+
</table>
|
83 |
+
<?php
|
84 |
+
} else {
|
85 |
+
?>
|
86 |
+
<table id="addresses" cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top; margin-bottom: 40px; padding:0;" border="0">
|
87 |
+
<tr>
|
88 |
+
<td style="text-align:<?php echo esc_attr( $text_align ); ?>; border:0;" valign="top" width="50%">
|
89 |
+
<h2><?php esc_html_e( 'Billing address', 'kadence-woocommerce-email-designer' ); ?></h2>
|
90 |
|
91 |
+
<address class="address">
|
92 |
+
<table cellspacing="0" cellpadding="0" style="width: 100%; padding:0;" border="0">
|
93 |
+
<tr>
|
94 |
+
<td class="address-td" valign="top">
|
95 |
+
<?php echo wp_kses_post( $address ? $address : esc_html__( 'N/A', 'kadence-woocommerce-email-designer' ) ); ?>
|
96 |
+
<?php
|
97 |
+
// Adds in support for plugin.
|
98 |
+
if ( ! class_exists( 'APG_Campo_NIF' ) ) {
|
99 |
+
if ( $order->get_billing_phone() ) :
|
100 |
+
?>
|
101 |
+
<br/><?php echo esc_html( $order->get_billing_phone() ); ?>
|
102 |
+
<?php endif; ?>
|
103 |
+
<?php if ( $order->get_billing_email() ) : ?>
|
104 |
+
<p><?php echo esc_html( $order->get_billing_email() ); ?></p>
|
105 |
+
<?php
|
106 |
+
endif;
|
107 |
+
}
|
108 |
+
?>
|
109 |
+
</td>
|
110 |
+
</tr>
|
111 |
+
</table>
|
112 |
+
</address>
|
113 |
</td>
|
114 |
+
<?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && $shipping ) : ?>
|
115 |
+
<td style="text-align:<?php echo esc_attr( $text_align ); ?>;" valign="top" width="50%">
|
116 |
+
<h2><?php esc_html_e( 'Shipping address', 'kadence-woocommerce-email-designer' ); ?></h2>
|
117 |
+
<address class="address">
|
118 |
+
<table cellspacing="0" cellpadding="0" style="width: 100%; padding:0;" border="0">
|
119 |
+
<tr>
|
120 |
+
<td class="address-td" valign="top">
|
121 |
+
<?php echo wp_kses_post( $shipping ); ?>
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
</table>
|
125 |
+
</address>
|
126 |
+
</td>
|
127 |
+
<?php endif; ?>
|
128 |
+
</tr>
|
129 |
+
</table>
|
130 |
+
<?php
|
131 |
+
}
|
templates/woo/emails/email-downloads.php
CHANGED
@@ -10,33 +10,39 @@
|
|
10 |
* happen. When this occurs the version of the template file will be bumped and
|
11 |
* the readme will list any important changes.
|
12 |
*
|
13 |
-
* @see
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates
|
16 |
* @version 3.4.0
|
17 |
*/
|
18 |
|
19 |
-
/**
|
20 |
* EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
|
21 |
*
|
22 |
* ADDED: Clear Div
|
|
|
|
|
23 |
*/
|
24 |
|
25 |
if ( ! defined( 'ABSPATH' ) ) {
|
26 |
exit;
|
27 |
}
|
28 |
|
29 |
-
$text_align
|
|
|
|
|
|
|
|
|
30 |
|
31 |
?>
|
32 |
<div style="clear:both; height:1px;"></div>
|
33 |
<h2 class="woocommerce-order-downloads__title"><?php esc_html_e( 'Downloads', 'kadence-woocommerce-email-designer' ); ?></h2>
|
34 |
|
35 |
-
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%;
|
36 |
<thead>
|
37 |
<tr>
|
38 |
<?php foreach ( $columns as $column_id => $column_name ) : ?>
|
39 |
-
<th class="td" scope="col" style="text-align:<?php echo $text_align; ?>;"><?php echo esc_html( $column_name ); ?></th>
|
40 |
<?php endforeach; ?>
|
41 |
</tr>
|
42 |
</thead>
|
@@ -44,31 +50,44 @@ $text_align = is_rtl() ? 'right' : 'left';
|
|
44 |
<?php foreach ( $downloads as $download ) : ?>
|
45 |
<tr>
|
46 |
<?php foreach ( $columns as $column_id => $column_name ) : ?>
|
47 |
-
|
|
|
48 |
if ( has_action( 'woocommerce_email_downloads_column_' . $column_id ) ) {
|
49 |
do_action( 'woocommerce_email_downloads_column_' . $column_id, $download, $plain_text );
|
50 |
} else {
|
51 |
switch ( $column_id ) {
|
52 |
-
case 'download-product'
|
53 |
-
|
|
|
54 |
<?php
|
55 |
-
|
56 |
-
case 'download-file'
|
|
|
57 |
<a href="<?php echo esc_url( $download['download_url'] ); ?>" class="woocommerce-MyAccount-downloads-file button alt"><?php echo esc_html( $download['download_name'] ); ?></a>
|
58 |
<?php
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
<?php
|
65 |
} else {
|
66 |
-
|
67 |
}
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
}
|
71 |
-
|
|
|
72 |
<?php endforeach; ?>
|
73 |
</tr>
|
74 |
<?php endforeach; ?>
|
10 |
* happen. When this occurs the version of the template file will be bumped and
|
11 |
* the readme will list any important changes.
|
12 |
*
|
13 |
+
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @author WooThemes
|
15 |
* @package WooCommerce/Templates
|
16 |
* @version 3.4.0
|
17 |
*/
|
18 |
|
19 |
+
/**
|
20 |
* EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
|
21 |
*
|
22 |
* ADDED: Clear Div
|
23 |
+
* Add support for responsive email.
|
24 |
+
*
|
25 |
*/
|
26 |
|
27 |
if ( ! defined( 'ABSPATH' ) ) {
|
28 |
exit;
|
29 |
}
|
30 |
|
31 |
+
$text_align = is_rtl() ? 'right' : 'left';
|
32 |
+
$responsive_check = Kadence_Woomail_Customizer::opt( 'responsive_mode' );
|
33 |
+
if ( true == $responsive_check ) {
|
34 |
+
unset( $columns['download-expires'] );
|
35 |
+
}
|
36 |
|
37 |
?>
|
38 |
<div style="clear:both; height:1px;"></div>
|
39 |
<h2 class="woocommerce-order-downloads__title"><?php esc_html_e( 'Downloads', 'kadence-woocommerce-email-designer' ); ?></h2>
|
40 |
|
41 |
+
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%; margin-bottom: 40px;" border="1">
|
42 |
<thead>
|
43 |
<tr>
|
44 |
<?php foreach ( $columns as $column_id => $column_name ) : ?>
|
45 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo esc_html( $column_name ); ?></th>
|
46 |
<?php endforeach; ?>
|
47 |
</tr>
|
48 |
</thead>
|
50 |
<?php foreach ( $downloads as $download ) : ?>
|
51 |
<tr>
|
52 |
<?php foreach ( $columns as $column_id => $column_name ) : ?>
|
53 |
+
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;">
|
54 |
+
<?php
|
55 |
if ( has_action( 'woocommerce_email_downloads_column_' . $column_id ) ) {
|
56 |
do_action( 'woocommerce_email_downloads_column_' . $column_id, $download, $plain_text );
|
57 |
} else {
|
58 |
switch ( $column_id ) {
|
59 |
+
case 'download-product':
|
60 |
+
?>
|
61 |
+
<a href="<?php echo esc_url( get_permalink( $download['product_id'] ) ); ?>"><?php echo wp_kses_post( $download['product_name'] ); ?></a>
|
62 |
<?php
|
63 |
+
break;
|
64 |
+
case 'download-file':
|
65 |
+
?>
|
66 |
<a href="<?php echo esc_url( $download['download_url'] ); ?>" class="woocommerce-MyAccount-downloads-file button alt"><?php echo esc_html( $download['download_name'] ); ?></a>
|
67 |
<?php
|
68 |
+
if ( true == $responsive_check ) {
|
69 |
+
if ( ! empty( $download['access_expires'] ) ) {
|
70 |
+
?>
|
71 |
+
<p style="margin-bottom:0;"><small><?php esc_html_e( 'Expires:', 'kadence-woocommerce-email-designer' ); ?> <time datetime="<?php echo esc_attr( date( 'Y-m-d', strtotime( $download['access_expires'] ) ) ); ?>" title="<?php echo esc_attr( strtotime( $download['access_expires'] ) ); ?>"><?php echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) ); ?></time></small></p>
|
72 |
+
<?php
|
|
|
73 |
} else {
|
74 |
+
echo '<p style="margin-bottom:0;"><small>' . esc_html__( 'Expires: Never', 'kadence-woocommerce-email-designer' ) . '</small></p>';
|
75 |
}
|
76 |
+
}
|
77 |
+
break;
|
78 |
+
case 'download-expires':
|
79 |
+
if ( ! empty( $download['access_expires'] ) ) {
|
80 |
+
?>
|
81 |
+
<time datetime="<?php echo esc_attr( date( 'Y-m-d', strtotime( $download['access_expires'] ) ) ); ?>" title="<?php echo esc_attr( strtotime( $download['access_expires'] ) ); ?>"><?php echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) ); ?></time>
|
82 |
+
<?php
|
83 |
+
} else {
|
84 |
+
esc_html_e( 'Never', 'kadence-woocommerce-email-designer' );
|
85 |
+
}
|
86 |
+
break;
|
87 |
}
|
88 |
}
|
89 |
+
?>
|
90 |
+
</td>
|
91 |
<?php endforeach; ?>
|
92 |
</tr>
|
93 |
<?php endforeach; ?>
|
templates/woo/emails/email-footer.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.7.0
|
17 |
*/
|
18 |
|
19 |
/**
|
templates/woo/emails/email-header.php
CHANGED
@@ -38,6 +38,12 @@ if ( ! empty( $email_subtitle ) ) {
|
|
38 |
$email_subtitle = Kadence_Woomail_Designer::filter_subtitle( $email_subtitle, $email );
|
39 |
}
|
40 |
$subtitle_placement = Kadence_Woomail_Customizer::opt( 'subtitle_placement' );
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
$order_style = Kadence_Woomail_Customizer::opt( 'order_items_style' );
|
42 |
if ( empty( $order_style ) ) {
|
43 |
$order_style = 'normal';
|
@@ -51,47 +57,70 @@ if ( empty( $header_image_maxwidth ) ) {
|
|
51 |
$header_image_maxwidth = 'auto';
|
52 |
}
|
53 |
$header_image_maxwidth = str_replace( 'px', '', $header_image_maxwidth );
|
54 |
-
|
|
|
|
|
|
|
|
|
55 |
?>
|
56 |
<!DOCTYPE html>
|
57 |
<html <?php language_attributes(); ?>>
|
58 |
<head>
|
59 |
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
|
60 |
-
<title><?php echo get_bloginfo( 'name', 'display' ); ?></title>
|
61 |
</head>
|
62 |
-
<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 )
|
63 |
-
<div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'?>">
|
64 |
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
|
65 |
<tr>
|
66 |
<td align="center" valign="top">
|
67 |
-
|
68 |
-
<div id="
|
69 |
-
<
|
70 |
-
<
|
71 |
-
<
|
72 |
-
|
73 |
-
|
74 |
-
|
|
|
75 |
}
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
|
|
80 |
</div>
|
81 |
-
|
82 |
<table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container">
|
83 |
<tr>
|
84 |
<td align="center" valign="top">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
<!-- Header -->
|
86 |
<table border="0" cellpadding="0" cellspacing="0" width="600" id="template_header">
|
87 |
<tr>
|
88 |
<td id="header_wrapper">
|
89 |
-
<?php if ( 'above'
|
90 |
-
<div class="subtitle"><?php echo $email_subtitle; ?></div>
|
91 |
<?php } ?>
|
92 |
-
<h1><?php echo $email_heading; ?></h1>
|
93 |
-
<?php if ( 'below'
|
94 |
-
<div class="subtitle"><?php echo $email_subtitle; ?></div>
|
95 |
<?php } ?>
|
96 |
</td>
|
97 |
</tr>
|
38 |
$email_subtitle = Kadence_Woomail_Designer::filter_subtitle( $email_subtitle, $email );
|
39 |
}
|
40 |
$subtitle_placement = Kadence_Woomail_Customizer::opt( 'subtitle_placement' );
|
41 |
+
$responsive_check = Kadence_Woomail_Customizer::opt( 'responsive_mode' );
|
42 |
+
if ( true == $responsive_check ) {
|
43 |
+
$responsive_mode = 'fluid';
|
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';
|
57 |
$header_image_maxwidth = 'auto';
|
58 |
}
|
59 |
$header_image_maxwidth = str_replace( 'px', '', $header_image_maxwidth );
|
60 |
+
$header_placement = Kadence_Woomail_Customizer::opt( 'header_image_placement' );
|
61 |
+
if ( empty( $header_placement ) ) {
|
62 |
+
$header_placement = 'outside';
|
63 |
+
}
|
64 |
+
$img = get_option( 'woocommerce_email_header_image' )
|
65 |
?>
|
66 |
<!DOCTYPE html>
|
67 |
<html <?php language_attributes(); ?>>
|
68 |
<head>
|
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>
|
76 |
<td align="center" valign="top">
|
77 |
+
<?php if ( 'inside' !== $header_placement ) { ?>
|
78 |
+
<div id="template_header_image_container">
|
79 |
+
<div id="template_header_image">
|
80 |
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_header_image_table">
|
81 |
+
<tr>
|
82 |
+
<td align="center" valign="middle">
|
83 |
+
<?php
|
84 |
+
if ( $img ) {
|
85 |
+
echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" width="' . esc_attr( $header_image_maxwidth ) . '" /></p>';
|
86 |
}
|
87 |
+
?>
|
88 |
+
</td>
|
89 |
+
</tr>
|
90 |
+
</table>
|
91 |
+
</div>
|
92 |
</div>
|
93 |
+
<?php } ?>
|
94 |
<table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container">
|
95 |
<tr>
|
96 |
<td align="center" valign="top">
|
97 |
+
<?php if ( 'inside' === $header_placement ) { ?>
|
98 |
+
<div id="template_header_image_container">
|
99 |
+
<div id="template_header_image">
|
100 |
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_header_image_table">
|
101 |
+
<tr>
|
102 |
+
<td align="center" valign="middle">
|
103 |
+
<?php
|
104 |
+
if ( $img ) {
|
105 |
+
echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" width="' . esc_attr( $header_image_maxwidth ) . '" /></p>';
|
106 |
+
}
|
107 |
+
?>
|
108 |
+
</td>
|
109 |
+
</tr>
|
110 |
+
</table>
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
<?php } ?>
|
114 |
<!-- Header -->
|
115 |
<table border="0" cellpadding="0" cellspacing="0" width="600" id="template_header">
|
116 |
<tr>
|
117 |
<td id="header_wrapper">
|
118 |
+
<?php if ( 'above' === $subtitle_placement && ! empty( $email_subtitle ) ) { ?>
|
119 |
+
<div class="subtitle"><?php echo wp_kses_post( $email_subtitle ); ?></div>
|
120 |
<?php } ?>
|
121 |
+
<h1><?php echo wp_kses_post( $email_heading ); ?></h1>
|
122 |
+
<?php if ( 'below' === $subtitle_placement && ! empty( $email_subtitle ) ) { ?>
|
123 |
+
<div class="subtitle"><?php echo wp_kses_post( $email_subtitle ); ?></div>
|
124 |
<?php } ?>
|
125 |
</td>
|
126 |
</tr>
|
templates/woo/emails/email-order-details.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
*
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @package WooCommerce/Templates/Emails
|
15 |
-
* @version 3.
|
16 |
*/
|
17 |
|
18 |
/*
|
@@ -20,65 +20,130 @@
|
|
20 |
*
|
21 |
* ADDED: option to split up order heading.
|
22 |
* Because woocommerce subscriptions and woocommerce core share the same file name (WHY!!!) this file is long with included logic for subscriptions.
|
|
|
23 |
*/
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
28 |
|
29 |
-
$text_align = is_rtl() ? 'right' : 'left';
|
30 |
if ( isset( $order_type ) && 'subscription' === $order_type && class_exists( 'WC_Subscriptions_Email' ) ) {
|
31 |
do_action( 'woocommerce_email_before_subscription_table', $order, $sent_to_admin, $plain_text, $email );
|
32 |
if ( 'cancelled_subscription' != $email->id ) {
|
33 |
echo '<h3>';
|
34 |
|
35 |
$link_element_url = ( $sent_to_admin ) ? wcs_get_edit_post_link( wcs_get_objects_property( $order, 'id' ) ) : $order->get_view_order_url();
|
36 |
-
// translators: $1-$3: opening and closing <a> tags $2: subscription's order number
|
37 |
printf( esc_html_x( 'Subscription %1$s#%2$s%3$s', 'Used in email notification', 'kadence-woocommerce-email-designer' ), '<a href="' . esc_url( $link_element_url ) . '">', esc_html( $order->get_order_number() ), '</a>' );
|
38 |
echo '</h3>';
|
39 |
}
|
40 |
-
|
41 |
-
|
42 |
-
<
|
43 |
-
<
|
44 |
-
<
|
45 |
-
<
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
?>
|
62 |
-
<
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
66 |
<?php
|
67 |
}
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
</table>
|
72 |
-
</div>
|
73 |
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
do_action( 'woocommerce_email_after_subscription_table', $order, $sent_to_admin, $plain_text, $email );
|
76 |
|
77 |
} else {
|
78 |
|
79 |
-
do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email );
|
|
|
80 |
<div style="clear:both; height:1px;"></div>
|
81 |
-
<?php
|
|
|
82 |
if ( empty( $order_head_style ) ) {
|
83 |
$order_head_style = 'normal';
|
84 |
}
|
@@ -93,22 +158,22 @@ if ( isset( $order_type ) && 'subscription' === $order_type && class_exists( 'WC
|
|
93 |
<tr>
|
94 |
<td align="left" valign="middle">
|
95 |
<h3 style="text-align: left;">
|
96 |
-
<?php
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
</h3>
|
108 |
</td>
|
109 |
<td align="right" valign="middle">
|
110 |
<h3 style="text-align: right;">
|
111 |
-
|
112 |
echo wp_kses_post( sprintf( __( 'Order date:', 'kadence-woocommerce-email-designer' ) . ' <time datetime="%s">%s</time>', $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) );
|
113 |
?>
|
114 |
</h3>
|
@@ -116,71 +181,166 @@ if ( isset( $order_type ) && 'subscription' === $order_type && class_exists( 'WC
|
|
116 |
</tr>
|
117 |
</table>
|
118 |
<?php
|
119 |
-
} else {
|
120 |
-
<h2>
|
121 |
-
<?php
|
122 |
-
if ( $sent_to_admin ) {
|
123 |
-
$before = '<a class="link" href="' . esc_url( $order->get_edit_order_url() ) . '">';
|
124 |
-
$after = '</a>';
|
125 |
-
} else {
|
126 |
-
$before = '';
|
127 |
-
$after = '';
|
128 |
-
}
|
129 |
-
/* translators: %s: Order ID. */
|
130 |
-
echo wp_kses_post( $before . sprintf( __( 'Order #%s', 'kadence-woocommerce-email-designer' ) . $after . ' (<time datetime="%s">%s</time>)', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) );
|
131 |
?>
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
<?php } ?>
|
134 |
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
<
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
?>
|
164 |
-
<
|
165 |
-
|
166 |
-
|
167 |
-
|
|
|
168 |
<?php
|
169 |
}
|
170 |
-
}
|
171 |
-
if ( $order->get_customer_note() ) {
|
172 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
<tr>
|
174 |
-
<th class="td" scope="
|
175 |
-
<
|
|
|
176 |
</tr>
|
|
|
|
|
177 |
<?php
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
|
184 |
-
<?php
|
185 |
do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email );
|
186 |
}
|
12 |
*
|
13 |
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
* @package WooCommerce/Templates/Emails
|
15 |
+
* @version 3.7.0
|
16 |
*/
|
17 |
|
18 |
/*
|
20 |
*
|
21 |
* ADDED: option to split up order heading.
|
22 |
* Because woocommerce subscriptions and woocommerce core share the same file name (WHY!!!) this file is long with included logic for subscriptions.
|
23 |
+
* ADDED: responsive mode so table is only two columns.
|
24 |
*/
|
25 |
|
26 |
+
defined( 'ABSPATH' ) || exit;
|
27 |
+
|
28 |
+
$text_align = is_rtl() ? 'right' : 'left';
|
29 |
+
$responsive_check = Kadence_Woomail_Customizer::opt( 'responsive_mode' );
|
30 |
+
$zebra_check = Kadence_Woomail_Customizer::opt( 'items_table_background_odd_color' );
|
31 |
+
$note_check = Kadence_Woomail_Customizer::opt( 'notes_outside_table' );
|
32 |
|
|
|
33 |
if ( isset( $order_type ) && 'subscription' === $order_type && class_exists( 'WC_Subscriptions_Email' ) ) {
|
34 |
do_action( 'woocommerce_email_before_subscription_table', $order, $sent_to_admin, $plain_text, $email );
|
35 |
if ( 'cancelled_subscription' != $email->id ) {
|
36 |
echo '<h3>';
|
37 |
|
38 |
$link_element_url = ( $sent_to_admin ) ? wcs_get_edit_post_link( wcs_get_objects_property( $order, 'id' ) ) : $order->get_view_order_url();
|
39 |
+
// translators: $1-$3: opening and closing <a> tags $2: subscription's order number.
|
40 |
printf( esc_html_x( 'Subscription %1$s#%2$s%3$s', 'Used in email notification', 'kadence-woocommerce-email-designer' ), '<a href="' . esc_url( $link_element_url ) . '">', esc_html( $order->get_order_number() ), '</a>' );
|
41 |
echo '</h3>';
|
42 |
}
|
43 |
+
if ( true == $responsive_check ) {
|
44 |
+
?>
|
45 |
+
<div style="margin-bottom: 40px;">
|
46 |
+
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%;" border="1">
|
47 |
+
<thead>
|
48 |
+
<tr>
|
49 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Product', 'kadence-woocommerce-email-designer' ); ?></th>
|
50 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Price', 'kadence-woocommerce-email-designer' ); ?></th>
|
51 |
+
</tr>
|
52 |
+
</thead>
|
53 |
+
<tbody>
|
54 |
+
<?php echo wp_kses_post( WC_Subscriptions_Email::email_order_items_table( $order, $order_items_table_args ) ); ?>
|
55 |
+
<?php
|
56 |
+
if ( empty( $zebra_check ) ) {
|
57 |
+
?>
|
58 |
+
</tbody>
|
59 |
+
<tfoot>
|
60 |
+
<?php
|
61 |
+
}
|
62 |
+
$item_totals = $order->get_order_item_totals();
|
63 |
|
64 |
+
if ( $item_totals ) {
|
65 |
+
$i = 0;
|
66 |
+
foreach ( $item_totals as $total ) {
|
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 |
+
}
|
75 |
+
}
|
76 |
+
if ( empty( $zebra_check ) ) {
|
77 |
?>
|
78 |
+
<tfoot>
|
79 |
+
<?php
|
80 |
+
} else {
|
81 |
+
?>
|
82 |
+
</tbody>
|
83 |
<?php
|
84 |
}
|
85 |
+
?>
|
86 |
+
</table>
|
87 |
+
</div>
|
|
|
|
|
88 |
|
89 |
+
<?php
|
90 |
+
} else {
|
91 |
+
?>
|
92 |
+
<div style="margin-bottom: 40px;">
|
93 |
+
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%;" border="1">
|
94 |
+
<thead>
|
95 |
+
<tr>
|
96 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Product', 'kadence-woocommerce-email-designer' ); ?></th>
|
97 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Quantity', 'kadence-woocommerce-email-designer' ); ?></th>
|
98 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Price', 'kadence-woocommerce-email-designer' ); ?></th>
|
99 |
+
</tr>
|
100 |
+
</thead>
|
101 |
+
<tbody>
|
102 |
+
<?php echo wp_kses_post( WC_Subscriptions_Email::email_order_items_table( $order, $order_items_table_args ) ); ?>
|
103 |
+
<?php
|
104 |
+
if ( empty( $zebra_check ) ) {
|
105 |
+
?>
|
106 |
+
</tbody>
|
107 |
+
<tfoot>
|
108 |
+
<?php
|
109 |
+
}
|
110 |
+
$item_totals = $order->get_order_item_totals();
|
111 |
+
|
112 |
+
if ( $item_totals ) {
|
113 |
+
$i = 0;
|
114 |
+
foreach ( $item_totals as $total ) {
|
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 |
+
}
|
123 |
+
}
|
124 |
+
if ( empty( $zebra_check ) ) {
|
125 |
+
?>
|
126 |
+
<tfoot>
|
127 |
+
<?php
|
128 |
+
} else {
|
129 |
+
?>
|
130 |
+
</tbody>
|
131 |
+
<?php
|
132 |
+
}
|
133 |
+
?>
|
134 |
+
</table>
|
135 |
+
</div>
|
136 |
+
<?php
|
137 |
+
}
|
138 |
do_action( 'woocommerce_email_after_subscription_table', $order, $sent_to_admin, $plain_text, $email );
|
139 |
|
140 |
} else {
|
141 |
|
142 |
+
do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email );
|
143 |
+
?>
|
144 |
<div style="clear:both; height:1px;"></div>
|
145 |
+
<?php
|
146 |
+
$order_head_style = Kadence_Woomail_Customizer::opt( 'order_heading_style' );
|
147 |
if ( empty( $order_head_style ) ) {
|
148 |
$order_head_style = 'normal';
|
149 |
}
|
158 |
<tr>
|
159 |
<td align="left" valign="middle">
|
160 |
<h3 style="text-align: left;">
|
161 |
+
<?php
|
162 |
+
if ( $sent_to_admin ) {
|
163 |
+
$before = '<a class="link" href="' . esc_url( $order->get_edit_order_url() ) . '">';
|
164 |
+
$after = '</a>';
|
165 |
+
} else {
|
166 |
+
$before = '';
|
167 |
+
$after = '';
|
168 |
+
}
|
169 |
+
/* translators: %s: Order ID. */
|
170 |
+
echo wp_kses_post( $before . sprintf( __( 'Order number: %s', 'kadence-woocommerce-email-designer' ) . $after, $order->get_order_number() ) );
|
171 |
+
?>
|
172 |
</h3>
|
173 |
</td>
|
174 |
<td align="right" valign="middle">
|
175 |
<h3 style="text-align: right;">
|
176 |
+
<?php
|
177 |
echo wp_kses_post( sprintf( __( 'Order date:', 'kadence-woocommerce-email-designer' ) . ' <time datetime="%s">%s</time>', $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) );
|
178 |
?>
|
179 |
</h3>
|
181 |
</tr>
|
182 |
</table>
|
183 |
<?php
|
184 |
+
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
?>
|
186 |
+
<h2>
|
187 |
+
<?php
|
188 |
+
if ( $sent_to_admin ) {
|
189 |
+
$before = '<a class="link" href="' . esc_url( $order->get_edit_order_url() ) . '">';
|
190 |
+
$after = '</a>';
|
191 |
+
} else {
|
192 |
+
$before = '';
|
193 |
+
$after = '';
|
194 |
+
}
|
195 |
+
/* translators: %s: Order ID. */
|
196 |
+
echo wp_kses_post( $before . sprintf( __( 'Order #%s', 'kadence-woocommerce-email-designer' ) . $after . ' (<time datetime="%s">%s</time>)', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) );
|
197 |
+
?>
|
198 |
+
</h2>
|
199 |
<?php } ?>
|
200 |
|
201 |
+
<?php
|
202 |
+
if ( true == $responsive_check ) {
|
203 |
+
?>
|
204 |
+
<div style="margin-bottom: 40px;">
|
205 |
+
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%;" border="1">
|
206 |
+
<thead>
|
207 |
+
<tr>
|
208 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Product', 'kadence-woocommerce-email-designer' ); ?></th>
|
209 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Price', 'kadence-woocommerce-email-designer' ); ?></th>
|
210 |
+
</tr>
|
211 |
+
</thead>
|
212 |
+
<tbody>
|
213 |
+
<?php
|
214 |
+
echo wc_get_email_order_items( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
215 |
+
$order,
|
216 |
+
array(
|
217 |
+
'show_sku' => $sent_to_admin,
|
218 |
+
'show_image' => false,
|
219 |
+
'image_size' => array( 32, 32 ),
|
220 |
+
'plain_text' => $plain_text,
|
221 |
+
'sent_to_admin' => $sent_to_admin,
|
222 |
+
)
|
223 |
+
);
|
224 |
+
if ( empty( $zebra_check ) ) {
|
225 |
+
?>
|
226 |
+
</tbody>
|
227 |
+
<tfoot>
|
228 |
+
<?php
|
229 |
+
}
|
230 |
+
$item_totals = $order->get_order_item_totals();
|
231 |
|
232 |
+
if ( $item_totals ) {
|
233 |
+
$i = 0;
|
234 |
+
foreach ( $item_totals as $total ) {
|
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 |
+
}
|
243 |
+
}
|
244 |
+
if ( empty( $zebra_check ) ) {
|
245 |
?>
|
246 |
+
<tfoot>
|
247 |
+
<?php
|
248 |
+
} else {
|
249 |
+
?>
|
250 |
+
</tbody>
|
251 |
<?php
|
252 |
}
|
|
|
|
|
253 |
?>
|
254 |
+
</table>
|
255 |
+
</div>
|
256 |
+
<?php
|
257 |
+
if ( $order->get_customer_note() ) {
|
258 |
+
?>
|
259 |
+
<div style="margin-bottom: 40px;">
|
260 |
+
<h2>
|
261 |
+
<?php echo esc_html__( 'Order Note', 'kadence-woocommerce-email-designer' ); ?>
|
262 |
+
</h2>
|
263 |
+
<p class="note-content"><?php echo wp_kses_post( nl2br( wptexturize( $order->get_customer_note() ) ) ); ?></p>
|
264 |
+
</div>
|
265 |
+
<?php
|
266 |
+
}
|
267 |
+
?>
|
268 |
+
<?php } else { ?>
|
269 |
+
<div style="margin-bottom: 40px;">
|
270 |
+
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%;" border="1">
|
271 |
+
<thead>
|
272 |
<tr>
|
273 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Product', 'kadence-woocommerce-email-designer' ); ?></th>
|
274 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Quantity', 'kadence-woocommerce-email-designer' ); ?></th>
|
275 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Price', 'kadence-woocommerce-email-designer' ); ?></th>
|
276 |
</tr>
|
277 |
+
</thead>
|
278 |
+
<tbody>
|
279 |
<?php
|
280 |
+
echo wc_get_email_order_items( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
281 |
+
$order,
|
282 |
+
array(
|
283 |
+
'show_sku' => $sent_to_admin,
|
284 |
+
'show_image' => false,
|
285 |
+
'image_size' => array( 32, 32 ),
|
286 |
+
'plain_text' => $plain_text,
|
287 |
+
'sent_to_admin' => $sent_to_admin,
|
288 |
+
)
|
289 |
+
);
|
290 |
+
if ( empty( $zebra_check ) ) {
|
291 |
+
?>
|
292 |
+
</tbody>
|
293 |
+
<tfoot>
|
294 |
+
<?php
|
295 |
+
}
|
296 |
+
$item_totals = $order->get_order_item_totals();
|
297 |
+
|
298 |
+
if ( $item_totals ) {
|
299 |
+
$i = 0;
|
300 |
+
foreach ( $item_totals as $total ) {
|
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 |
+
}
|
309 |
+
}
|
310 |
+
if ( false == $note_check && $order->get_customer_note() ) {
|
311 |
+
?>
|
312 |
+
<tr>
|
313 |
+
<th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Note:', 'kadence-woocommerce-email-designer' ); ?></th>
|
314 |
+
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( nl2br( wptexturize( $order->get_customer_note() ) ) ); ?></td>
|
315 |
+
</tr>
|
316 |
+
<?php
|
317 |
+
}
|
318 |
+
if ( empty( $zebra_check ) ) {
|
319 |
+
?>
|
320 |
+
<tfoot>
|
321 |
+
<?php
|
322 |
+
} else {
|
323 |
+
?>
|
324 |
+
</tbody>
|
325 |
+
<?php
|
326 |
+
}
|
327 |
+
?>
|
328 |
+
</table>
|
329 |
+
</div>
|
330 |
+
<?php
|
331 |
+
if ( true == $note_check && $order->get_customer_note() ) {
|
332 |
+
?>
|
333 |
+
<div style="margin-bottom: 40px;">
|
334 |
+
<h2>
|
335 |
+
<?php echo esc_html__( 'Order Note', 'kadence-woocommerce-email-designer' ); ?>
|
336 |
+
</h2>
|
337 |
+
<p class="note-content"><?php echo wp_kses_post( nl2br( wptexturize( $order->get_customer_note() ) ) ); ?></p>
|
338 |
+
</div>
|
339 |
+
<?php
|
340 |
+
}
|
341 |
+
?>
|
342 |
+
<?php
|
343 |
+
}
|
344 |
|
|
|
345 |
do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email );
|
346 |
}
|
templates/woo/emails/email-order-items.php
ADDED
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Email Order Items
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-items.php.
|
6 |
+
*
|
7 |
+
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
8 |
+
* (the theme developer) will need to copy the new files to your theme to
|
9 |
+
* maintain compatibility. We try to do this as little as possible, but it does
|
10 |
+
* happen. When this occurs the version of the template file will be bumped and
|
11 |
+
* the readme will list any important changes.
|
12 |
+
*
|
13 |
+
* @see https://docs.woocommerce.com/document/template-structure/
|
14 |
+
* @package WooCommerce/Templates/Emails
|
15 |
+
* @version 3.7.0
|
16 |
+
*/
|
17 |
+
|
18 |
+
/*
|
19 |
+
* EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
|
20 |
+
*
|
21 |
+
* ADDED: responsive mode so table is only two columns.
|
22 |
+
*/
|
23 |
+
|
24 |
+
defined( 'ABSPATH' ) || exit;
|
25 |
+
|
26 |
+
$text_align = is_rtl() ? 'right' : 'left';
|
27 |
+
$margin_side = is_rtl() ? 'left' : 'right';
|
28 |
+
|
29 |
+
$responsive_check = Kadence_Woomail_Customizer::opt( 'responsive_mode' );
|
30 |
+
if ( true == $responsive_check ) {
|
31 |
+
foreach ( $items as $item_id => $item ) :
|
32 |
+
$product = $item->get_product();
|
33 |
+
$sku = '';
|
34 |
+
$purchase_note = '';
|
35 |
+
$image = '';
|
36 |
+
|
37 |
+
if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
|
38 |
+
continue;
|
39 |
+
}
|
40 |
+
|
41 |
+
if ( is_object( $product ) ) {
|
42 |
+
$sku = $product->get_sku();
|
43 |
+
$purchase_note = $product->get_purchase_note();
|
44 |
+
$image = $product->get_image( $image_size );
|
45 |
+
}
|
46 |
+
|
47 |
+
?>
|
48 |
+
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item', $item, $order ) ); ?>">
|
49 |
+
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align: middle; word-wrap:break-word;">
|
50 |
+
<?php
|
51 |
+
|
52 |
+
// Show title/image etc.
|
53 |
+
if ( $show_image ) {
|
54 |
+
echo wp_kses_post( apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) );
|
55 |
+
}
|
56 |
+
|
57 |
+
// Product name.
|
58 |
+
echo '<p style="margin-bottom:0;"><strong>' . wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) ) . '</strong></p>';
|
59 |
+
|
60 |
+
// SKU.
|
61 |
+
if ( $show_sku && $sku ) {
|
62 |
+
echo wp_kses_post( ' (#' . $sku . ')' );
|
63 |
+
}
|
64 |
+
|
65 |
+
// allow other plugins to add additional product information here.
|
66 |
+
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text );
|
67 |
+
|
68 |
+
wc_display_item_meta(
|
69 |
+
$item,
|
70 |
+
array(
|
71 |
+
'label_before' => '<strong class="wc-item-meta-label" style="margin-' . esc_attr( $margin_side ) . ': .25em; clear: both">',
|
72 |
+
)
|
73 |
+
);
|
74 |
+
|
75 |
+
// allow other plugins to add additional product information here.
|
76 |
+
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text );
|
77 |
+
|
78 |
+
$qty = $item->get_quantity();
|
79 |
+
$refunded_qty = $order->get_qty_refunded_for_item( $item_id );
|
80 |
+
|
81 |
+
if ( $refunded_qty ) {
|
82 |
+
$qty_display = '<del>' . esc_html( $qty ) . '</del> <ins>' . esc_html( $qty - ( $refunded_qty * -1 ) ) . '</ins>';
|
83 |
+
} else {
|
84 |
+
$qty_display = esc_html( $qty );
|
85 |
+
}
|
86 |
+
echo '<p class="inside-quantity" style="margin-bottom:0;">' . esc_html__( 'Quantity:', 'kadence-woocommerce-email-designer' ) . ' ' . wp_kses_post( apply_filters( 'woocommerce_email_order_item_quantity', $qty_display, $item ) ) . '</p>';
|
87 |
+
|
88 |
+
?>
|
89 |
+
</td>
|
90 |
+
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align:middle;">
|
91 |
+
<?php echo wp_kses_post( $order->get_formatted_line_subtotal( $item ) ); ?>
|
92 |
+
</td>
|
93 |
+
</tr>
|
94 |
+
<?php
|
95 |
+
|
96 |
+
if ( $show_purchase_note && $purchase_note ) {
|
97 |
+
?>
|
98 |
+
<tr>
|
99 |
+
<td colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align:middle;">
|
100 |
+
<?php
|
101 |
+
echo wp_kses_post( wpautop( do_shortcode( $purchase_note ) ) );
|
102 |
+
?>
|
103 |
+
</td>
|
104 |
+
</tr>
|
105 |
+
<?php
|
106 |
+
}
|
107 |
+
?>
|
108 |
+
|
109 |
+
<?php
|
110 |
+
endforeach;
|
111 |
+
|
112 |
+
} else {
|
113 |
+
foreach ( $items as $item_id => $item ) :
|
114 |
+
$product = $item->get_product();
|
115 |
+
$sku = '';
|
116 |
+
$purchase_note = '';
|
117 |
+
$image = '';
|
118 |
+
|
119 |
+
if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
|
120 |
+
continue;
|
121 |
+
}
|
122 |
+
|
123 |
+
if ( is_object( $product ) ) {
|
124 |
+
$sku = $product->get_sku();
|
125 |
+
$purchase_note = $product->get_purchase_note();
|
126 |
+
$image = $product->get_image( $image_size );
|
127 |
+
}
|
128 |
+
|
129 |
+
?>
|
130 |
+
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item', $item, $order ) ); ?>">
|
131 |
+
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align: middle; word-wrap:break-word;">
|
132 |
+
<?php
|
133 |
+
|
134 |
+
// Show title/image etc.
|
135 |
+
if ( $show_image ) {
|
136 |
+
echo wp_kses_post( apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) );
|
137 |
+
}
|
138 |
+
|
139 |
+
// Product name.
|
140 |
+
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) );
|
141 |
+
|
142 |
+
// SKU.
|
143 |
+
if ( $show_sku && $sku ) {
|
144 |
+
echo wp_kses_post( ' (#' . $sku . ')' );
|
145 |
+
}
|
146 |
+
|
147 |
+
// allow other plugins to add additional product information here.
|
148 |
+
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text );
|
149 |
+
|
150 |
+
wc_display_item_meta(
|
151 |
+
$item,
|
152 |
+
array(
|
153 |
+
'label_before' => '<strong class="wc-item-meta-label" style="float: ' . esc_attr( $text_align ) . '; margin-' . esc_attr( $margin_side ) . ': .25em; clear: both">',
|
154 |
+
)
|
155 |
+
);
|
156 |
+
|
157 |
+
// allow other plugins to add additional product information here.
|
158 |
+
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text );
|
159 |
+
|
160 |
+
?>
|
161 |
+
</td>
|
162 |
+
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align:middle;">
|
163 |
+
<?php
|
164 |
+
$qty = $item->get_quantity();
|
165 |
+
$refunded_qty = $order->get_qty_refunded_for_item( $item_id );
|
166 |
+
|
167 |
+
if ( $refunded_qty ) {
|
168 |
+
$qty_display = '<del>' . esc_html( $qty ) . '</del> <ins>' . esc_html( $qty - ( $refunded_qty * -1 ) ) . '</ins>';
|
169 |
+
} else {
|
170 |
+
$qty_display = esc_html( $qty );
|
171 |
+
}
|
172 |
+
echo wp_kses_post( apply_filters( 'woocommerce_email_order_item_quantity', $qty_display, $item ) );
|
173 |
+
?>
|
174 |
+
</td>
|
175 |
+
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align:middle;">
|
176 |
+
<?php echo wp_kses_post( $order->get_formatted_line_subtotal( $item ) ); ?>
|
177 |
+
</td>
|
178 |
+
</tr>
|
179 |
+
<?php
|
180 |
+
|
181 |
+
if ( $show_purchase_note && $purchase_note ) {
|
182 |
+
?>
|
183 |
+
<tr>
|
184 |
+
<td colspan="3" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align:middle;">
|
185 |
+
<?php
|
186 |
+
echo wp_kses_post( wpautop( do_shortcode( $purchase_note ) ) );
|
187 |
+
?>
|
188 |
+
</td>
|
189 |
+
</tr>
|
190 |
+
<?php
|
191 |
+
}
|
192 |
+
?>
|
193 |
+
|
194 |
+
<?php
|
195 |
+
endforeach;
|
196 |
+
}
|
197 |
+
?>
|
templates/woo/emails/email-styles.php
CHANGED
@@ -62,12 +62,36 @@ html, body {
|
|
62 |
height:100%;
|
63 |
position:relative;
|
64 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
#body_content_inner > table {
|
66 |
border-collapse: collapse;
|
67 |
}
|
68 |
-
#body_content_inner > table.td > tbody {
|
69 |
-
border-bottom-style: solid;
|
70 |
-
}
|
71 |
#template_header_image p {
|
72 |
margin-bottom:0;
|
73 |
}
|
@@ -137,18 +161,19 @@ body {
|
|
137 |
|
138 |
#body_content td ul.wc-item-meta {
|
139 |
font-size: small;
|
140 |
-
margin:
|
141 |
padding: 0;
|
142 |
list-style: none;
|
143 |
}
|
144 |
|
145 |
#body_content td ul.wc-item-meta li {
|
146 |
-
margin: 0
|
147 |
padding: 0;
|
148 |
}
|
149 |
|
150 |
#body_content td ul.wc-item-meta li p {
|
151 |
margin: 0;
|
|
|
152 |
}
|
153 |
|
154 |
#body_content p {
|
@@ -167,7 +192,7 @@ body {
|
|
167 |
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
|
168 |
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
|
169 |
}
|
170 |
-
.address {
|
171 |
padding:12px 12px;
|
172 |
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
|
173 |
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
|
@@ -175,15 +200,14 @@ body {
|
|
175 |
#body_content .address p {
|
176 |
margin: 0;
|
177 |
}
|
178 |
-
#addresses tr td {
|
179 |
padding-left:5px;
|
180 |
padding-right:5px;
|
181 |
}
|
182 |
-
#addresses tr {
|
183 |
-
margin-left
|
184 |
-
margin-right
|
185 |
}
|
186 |
-
|
187 |
.text {
|
188 |
color: <?php echo esc_attr( $text ); ?>;
|
189 |
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
@@ -235,12 +259,14 @@ a {
|
|
235 |
text-decoration: underline;
|
236 |
}
|
237 |
.btn {
|
238 |
-
padding:
|
239 |
display: inline-block;
|
240 |
color:white !important;
|
241 |
background-color: <?php echo esc_attr( $base ); ?>;
|
242 |
text-decoration: none;
|
243 |
-
font-weight:
|
|
|
|
|
244 |
}
|
245 |
img {
|
246 |
border: none;
|
62 |
height:100%;
|
63 |
position:relative;
|
64 |
}
|
65 |
+
body.kt-woo-wrap {
|
66 |
+
margin:0;
|
67 |
+
padding:0;
|
68 |
+
}
|
69 |
+
.k-responsive-fluid #template_container, .k-responsive-fluid #template_header_image, .k-responsive-fluid #template_header, .k-responsive-fluid #template_body, .k-responsive-fluid #template_footer {
|
70 |
+
width:100% !important;
|
71 |
+
min-width:320px !important;
|
72 |
+
}
|
73 |
+
.k-responsive-fluid #wrapper {
|
74 |
+
margin: 0 auto !important;
|
75 |
+
}
|
76 |
+
.k-responsive-fluid .order_item img {
|
77 |
+
float:left;
|
78 |
+
padding-right:10px;
|
79 |
+
padding-bottom:0;
|
80 |
+
}
|
81 |
+
.k-responsive-fluid #body_content table td td {
|
82 |
+
min-width:60px;
|
83 |
+
}
|
84 |
+
.k-responsive-fluid #addresses > tbody > tr > td {
|
85 |
+
padding-left:0px;
|
86 |
+
padding-right:0px;
|
87 |
+
}
|
88 |
+
.k-responsive-fluid #addresses > tbody > tr {
|
89 |
+
margin-left: 0px;
|
90 |
+
margin-right: 0px;
|
91 |
+
}
|
92 |
#body_content_inner > table {
|
93 |
border-collapse: collapse;
|
94 |
}
|
|
|
|
|
|
|
95 |
#template_header_image p {
|
96 |
margin-bottom:0;
|
97 |
}
|
161 |
|
162 |
#body_content td ul.wc-item-meta {
|
163 |
font-size: small;
|
164 |
+
margin: 0;
|
165 |
padding: 0;
|
166 |
list-style: none;
|
167 |
}
|
168 |
|
169 |
#body_content td ul.wc-item-meta li {
|
170 |
+
margin: 0;
|
171 |
padding: 0;
|
172 |
}
|
173 |
|
174 |
#body_content td ul.wc-item-meta li p {
|
175 |
margin: 0;
|
176 |
+
display:inline;
|
177 |
}
|
178 |
|
179 |
#body_content p {
|
192 |
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
|
193 |
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
|
194 |
}
|
195 |
+
.address-td {
|
196 |
padding:12px 12px;
|
197 |
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
|
198 |
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
|
200 |
#body_content .address p {
|
201 |
margin: 0;
|
202 |
}
|
203 |
+
#addresses > tbody > tr > td {
|
204 |
padding-left:5px;
|
205 |
padding-right:5px;
|
206 |
}
|
207 |
+
#addresses > tbody > tr {
|
208 |
+
margin-left: -5px;
|
209 |
+
margin-right: -5px;
|
210 |
}
|
|
|
211 |
.text {
|
212 |
color: <?php echo esc_attr( $text ); ?>;
|
213 |
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
259 |
text-decoration: underline;
|
260 |
}
|
261 |
.btn {
|
262 |
+
padding: 10px 16px;
|
263 |
display: inline-block;
|
264 |
color:white !important;
|
265 |
background-color: <?php echo esc_attr( $base ); ?>;
|
266 |
text-decoration: none;
|
267 |
+
font-weight: 600;
|
268 |
+
border-style: solid;
|
269 |
+
border-width: 0;
|
270 |
}
|
271 |
img {
|
272 |
border: none;
|
templates/woo/emails/subscription-info.php
CHANGED
@@ -6,37 +6,75 @@
|
|
6 |
* @package WooCommerce_Subscriptions/Templates/Emails
|
7 |
* @version 1.5.0
|
8 |
*/
|
|
|
9 |
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit; // Exit if accessed directly
|
11 |
}
|
12 |
-
|
13 |
* EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
|
14 |
* ADDED: Separator spans.
|
|
|
15 |
*/
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
<
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
<?php endif; ?>
|
6 |
* @package WooCommerce_Subscriptions/Templates/Emails
|
7 |
* @version 1.5.0
|
8 |
*/
|
9 |
+
|
10 |
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit; // Exit if accessed directly.
|
12 |
}
|
13 |
+
/**
|
14 |
* EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
|
15 |
* ADDED: Separator spans.
|
16 |
+
* ADDED: Responsive layout.
|
17 |
*/
|
18 |
+
$responsive_check = Kadence_Woomail_Customizer::opt( 'responsive_mode' );
|
19 |
+
$text_align = is_rtl() ? 'right' : 'left';
|
20 |
+
|
21 |
+
if ( ! empty( $subscriptions ) ) :
|
22 |
+
if ( true == $responsive_check ) {
|
23 |
+
?>
|
24 |
+
<div style="clear:both; height:1px;"></div>
|
25 |
+
<h2><?php esc_html_e( 'Subscription Information:', 'kadence-woocommerce-email-designer' ); ?></h2>
|
26 |
+
<div style="padding-bottom: 20px;">
|
27 |
+
<?php foreach ( $subscriptions as $subscription ) : ?>
|
28 |
+
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%; margin-bottom: 20px;" border="1">
|
29 |
+
<tbody>
|
30 |
+
<tr>
|
31 |
+
<td class="td" scope="row" style="text-align:<?php echo esc_attr( $text_align ); ?>;">
|
32 |
+
<p style="margin-bottom: 0"><strong><?php esc_html_e( 'Subscription', 'kadence-woocommerce-email-designer' ); ?></strong></p>
|
33 |
+
<p style="margin-bottom: 0"><a href="<?php echo esc_url( ( $is_admin_email ) ? wcs_get_edit_post_link( $subscription->get_id() ) : $subscription->get_view_order_url() ); ?>"><?php echo sprintf( esc_html_x( '#%s', 'subscription number in email table. (eg: #106)', 'kadence-woocommerce-email-designer' ), esc_html( $subscription->get_order_number() ) ); ?></a></p>
|
34 |
+
</td>
|
35 |
+
<td class="td" scope="row" style="text-align:<?php echo esc_attr( $text_align ); ?>;">
|
36 |
+
<p style="margin-bottom: 0"><strong><?php echo esc_html_x( 'Price', 'table heading', 'kadence-woocommerce-email-designer' ); ?></strong></p>
|
37 |
+
<p style="margin-bottom: 0"><?php echo wp_kses_post( $subscription->get_formatted_order_total() ); ?></p>
|
38 |
+
</td>
|
39 |
+
</tr>
|
40 |
+
<tr>
|
41 |
+
<td class="td" scope="row" style="text-align:<?php echo esc_attr( $text_align ); ?>;">
|
42 |
+
<p style="margin-bottom: 0"><strong><?php echo esc_html_x( 'Start Date', 'table heading', 'kadence-woocommerce-email-designer' ); ?></strong></p>
|
43 |
+
<p style="margin-bottom: 0"><?php echo esc_html( date_i18n( wc_date_format(), $subscription->get_time( 'date_created', 'site' ) ) ); ?></p>
|
44 |
+
</td>
|
45 |
+
<td class="td" scope="row" style="text-align:<?php echo esc_attr( $text_align ); ?>;">
|
46 |
+
<p style="margin-bottom: 0"><strong><?php echo esc_html_x( 'End Date', 'table heading', 'kadence-woocommerce-email-designer' ); ?></strong></p>
|
47 |
+
<p style="margin-bottom: 0"><?php echo esc_html( ( 0 < $subscription->get_time( 'end' ) ) ? date_i18n( wc_date_format(), $subscription->get_time( 'end', 'site' ) ) : _x( 'When Cancelled', 'Used as end date for an indefinite subscription', 'kadence-woocommerce-email-designer' ) ); ?></p>
|
48 |
+
</td>
|
49 |
+
</tr>
|
50 |
+
</tbody>
|
51 |
+
</table>
|
52 |
+
<?php endforeach; ?>
|
53 |
+
</div>
|
54 |
+
<?php } else { ?>
|
55 |
+
<div style="clear:both; height:1px;"></div>
|
56 |
+
<h2><?php esc_html_e( 'Subscription Information:', 'kadence-woocommerce-email-designer' ); ?></h2>
|
57 |
+
<div style="margin-bottom: 40px;">
|
58 |
+
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%;" border="1">
|
59 |
+
<thead>
|
60 |
+
<tr>
|
61 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Subscription', 'kadence-woocommerce-email-designer' ); ?></th>
|
62 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo esc_html_x( 'Start Date', 'table heading', 'kadence-woocommerce-email-designer' ); ?></th>
|
63 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo esc_html_x( 'End Date', 'table heading', 'kadence-woocommerce-email-designer' ); ?></th>
|
64 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo esc_html_x( 'Price', 'table heading', 'kadence-woocommerce-email-designer' ); ?></th>
|
65 |
+
</tr>
|
66 |
+
</thead>
|
67 |
+
<tbody>
|
68 |
+
<?php foreach ( $subscriptions as $subscription ) : ?>
|
69 |
+
<tr>
|
70 |
+
<td class="td" scope="row" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><a href="<?php echo esc_url( ( $is_admin_email ) ? wcs_get_edit_post_link( $subscription->get_id() ) : $subscription->get_view_order_url() ); ?>"><?php echo sprintf( esc_html_x( '#%s', 'subscription number in email table. (eg: #106)', 'kadence-woocommerce-email-designer' ), esc_html( $subscription->get_order_number() ) ); ?></a></td>
|
71 |
+
<td class="td" scope="row" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo esc_html( date_i18n( wc_date_format(), $subscription->get_time( 'date_created', 'site' ) ) ); ?></td>
|
72 |
+
<td class="td" scope="row" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo esc_html( ( 0 < $subscription->get_time( 'end' ) ) ? date_i18n( wc_date_format(), $subscription->get_time( 'end', 'site' ) ) : _x( 'When Cancelled', 'Used as end date for an indefinite subscription', 'kadence-woocommerce-email-designer' ) ); ?></td>
|
73 |
+
<td class="td" scope="row" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( $subscription->get_formatted_order_total() ); ?></td>
|
74 |
+
</tr>
|
75 |
+
<?php endforeach; ?>
|
76 |
+
</tbody>
|
77 |
+
</table>
|
78 |
+
</div>
|
79 |
+
<?php } ?>
|
80 |
<?php endif; ?>
|