From 637386d1a8774aa0af15445022cb6355c31cbaf4 Mon Sep 17 00:00:00 2001 From: WP Experts Date: Fri, 16 Dec 2022 17:34:19 +0500 Subject: [PATCH] Email Templates v1.4 Email Template 1.4 released. --- README.txt | 24 +- admin/class-mailtpl-admin.php | 134 +- admin/js/mailtpl-admin.js | 28 +- admin/templates/partials/default-message.php | 4 +- admin/templates/partials/footer.php | 2 +- admin/templates/partials/header.php | 2 +- assets/css/customizer-icon-select.css | 379 ++ assets/css/customizer-range-value-control.css | 110 + assets/css/customizer-repeater-control.css | 213 ++ assets/css/customizer-styles.css | 166 + .../css/customizer-toggle-switch-control.css | 114 + assets/css/fonts/iconpicker.eot | Bin 0 -> 5548 bytes assets/css/fonts/iconpicker.svg | 19 + assets/css/fonts/iconpicker.ttf | Bin 0 -> 5372 bytes assets/css/fonts/iconpicker.woff | Bin 0 -> 3344 bytes assets/css/fonts/woomail-social.eot | Bin 0 -> 6188 bytes assets/css/fonts/woomail-social.svg | 26 + assets/css/fonts/woomail-social.ttf | Bin 0 -> 5996 bytes assets/css/fonts/woomail-social.woff | Bin 0 -> 6072 bytes assets/css/fonts/woomail-social.woff2 | Bin 0 -> 3440 bytes assets/fonts/iconpicker.eot | Bin 0 -> 5548 bytes assets/fonts/iconpicker.svg | 19 + assets/fonts/iconpicker.ttf | Bin 0 -> 5372 bytes assets/fonts/iconpicker.woff | Bin 0 -> 3344 bytes assets/images/WooCommerce-wordpress-01.png | Bin 0 -> 30241 bytes assets/images/WooCommerce-wordpress-02.png | Bin 0 -> 32385 bytes assets/images/attendees.xlsx | Bin 0 -> 187339 bytes assets/images/black/digg.png | Bin 0 -> 475 bytes assets/images/black/dribbble.png | Bin 0 -> 1660 bytes assets/images/black/facebook.png | Bin 0 -> 627 bytes assets/images/black/google-plus.png | Bin 0 -> 882 bytes assets/images/black/instagram.png | Bin 0 -> 1447 bytes assets/images/black/link.png | Bin 0 -> 1237 bytes assets/images/black/linkedin.png | Bin 0 -> 726 bytes assets/images/black/pinterest.png | Bin 0 -> 1215 bytes assets/images/black/rss.png | Bin 0 -> 1072 bytes assets/images/black/stumbleupon.png | Bin 0 -> 926 bytes assets/images/black/tumblr.png | Bin 0 -> 722 bytes assets/images/black/twitter.png | Bin 0 -> 880 bytes assets/images/black/vimeo.png | Bin 0 -> 974 bytes assets/images/black/vk.png | Bin 0 -> 904 bytes assets/images/black/whatsapp.png | Bin 0 -> 1467 bytes assets/images/black/youtube.png | Bin 0 -> 1306 bytes assets/images/gray/digg.png | Bin 0 -> 557 bytes assets/images/gray/dribbble.png | Bin 0 -> 2287 bytes assets/images/gray/facebook.png | Bin 0 -> 786 bytes assets/images/gray/google-plus.png | Bin 0 -> 1175 bytes assets/images/gray/instagram.png | Bin 0 -> 1973 bytes assets/images/gray/link.png | Bin 0 -> 1672 bytes assets/images/gray/linkedin.png | Bin 0 -> 978 bytes assets/images/gray/pinterest.png | Bin 0 -> 1644 bytes assets/images/gray/rss.png | Bin 0 -> 1408 bytes assets/images/gray/stumbleupon.png | Bin 0 -> 1190 bytes assets/images/gray/tumblr.png | Bin 0 -> 938 bytes assets/images/gray/twitter.png | Bin 0 -> 1154 bytes assets/images/gray/vimeo.png | Bin 0 -> 1316 bytes assets/images/gray/vk.png | Bin 0 -> 1160 bytes assets/images/gray/whatsapp.png | Bin 0 -> 2013 bytes assets/images/gray/youtube.png | Bin 0 -> 1807 bytes assets/images/icon-128x128.png | Bin 0 -> 12964 bytes assets/images/image-1-01.png | Bin 0 -> 43647 bytes assets/images/image-2-02.png | Bin 0 -> 33844 bytes assets/images/kt_flat_template.jpg | Bin 0 -> 55913 bytes assets/images/kt_full_template.jpg | Bin 0 -> 30748 bytes assets/images/kt_skinny_template.jpg | Bin 0 -> 29829 bytes assets/images/white/digg.png | Bin 0 -> 493 bytes assets/images/white/dribbble.png | Bin 0 -> 1830 bytes assets/images/white/facebook.png | Bin 0 -> 665 bytes assets/images/white/google-plus.png | Bin 0 -> 973 bytes assets/images/white/instagram.png | Bin 0 -> 1587 bytes assets/images/white/link.png | Bin 0 -> 1344 bytes assets/images/white/linkedin.png | Bin 0 -> 787 bytes assets/images/white/pinterest.png | Bin 0 -> 1342 bytes assets/images/white/rss.png | Bin 0 -> 1154 bytes assets/images/white/stumbleupon.png | Bin 0 -> 989 bytes assets/images/white/tumblr.png | Bin 0 -> 776 bytes assets/images/white/twitter.png | Bin 0 -> 951 bytes assets/images/white/vimeo.png | Bin 0 -> 1065 bytes assets/images/white/vk.png | Bin 0 -> 977 bytes assets/images/white/whatsapp.png | Bin 0 -> 1631 bytes assets/images/white/youtube.png | Bin 0 -> 1422 bytes assets/js/customizer-range-value-control.js | 29 + assets/js/customizer-repeater-control.js | 411 +++ assets/js/customizer-scripts.js | 230 ++ assets/js/customizer-toggle-switch-control.js | 28 + email-templates.php | 857 ++++- ...customizer-mailtplimportexport-control.php | 40 + ...ss-customizer-mailtplinfoblock-control.php | 22 + ...ss-customizer-mailtplsendemail-control.php | 27 + ...customizer-mailtpltemplateload-control.php | 41 + .../class-customizer-range-value-control.php | 44 + .../class-customizer-repeater-control.php | 385 ++ includes/class-customizer-toggle-control.php | 72 + includes/class-mailtpl-activator.php | 2 +- includes/class-mailtpl-customizer.php | 10 +- includes/class-mailtpl-deactivator.php | 2 +- includes/class-mailtpl-i18n.php | 2 +- includes/class-mailtpl-loader.php | 2 +- includes/class-mailtpl-mailer.php | 5 +- includes/class-mailtpl-woomail-customizer.php | 1157 ++++++ .../class-mailtpl-woomail-import-export.php | 362 ++ .../class-mailtpl-woomail-import-option.php | 24 + includes/class-mailtpl-woomail-preview.php | 1101 ++++++ includes/class-mailtpl-woomail-settings.php | 3236 +++++++++++++++++ includes/class-mailtpl-woomail-woo.php | 127 + includes/class-mailtpl.php | 19 +- index.php | 4 +- preview.php | 51 + templates/wcmp/vendor-new-order.php | 107 + .../woo/emails/admin-cancelled-order.php | 68 + templates/woo/emails/admin-failed-order.php | 68 + templates/woo/emails/admin-new-order.php | 68 + .../woo/emails/admin-new-renewal-order.php | 44 + templates/woo/emails/admin-payment-retry.php | 68 + .../woo/emails/cancelled-subscription.php | 120 + .../woo/emails/customer-completed-order.php | 68 + .../customer-completed-renewal-order.php | 46 + .../customer-completed-switch-order.php | 50 + templates/woo/emails/customer-invoice.php | 81 + templates/woo/emails/customer-new-account.php | 66 + templates/woo/emails/customer-note.php | 74 + .../woo/emails/customer-on-hold-order.php | 68 + .../woo/emails/customer-payment-retry.php | 68 + .../woo/emails/customer-processing-order.php | 68 + .../customer-processing-renewal-order.php | 47 + .../woo/emails/customer-refunded-order.php | 68 + .../woo/emails/customer-renewal-invoice.php | 42 + .../woo/emails/customer-reset-password.php | 59 + templates/woo/emails/email-addresses.php | 131 + .../woo/emails/email-customer-details.php | 41 + templates/woo/emails/email-downloads.php | 94 + templates/woo/emails/email-footer.php | 110 + templates/woo/emails/email-header.php | 169 + templates/woo/emails/email-order-details.php | 346 ++ templates/woo/emails/email-order-items.php | 197 + templates/woo/emails/email-styles.php | 306 ++ templates/woo/emails/subscription-info.php | 80 + templates/woo/emails/waitlist-mailout.php | 43 + wpml-config.xml | 43 + 139 files changed, 12352 insertions(+), 86 deletions(-) create mode 100644 assets/css/customizer-icon-select.css create mode 100644 assets/css/customizer-range-value-control.css create mode 100644 assets/css/customizer-repeater-control.css create mode 100644 assets/css/customizer-styles.css create mode 100644 assets/css/customizer-toggle-switch-control.css create mode 100644 assets/css/fonts/iconpicker.eot create mode 100644 assets/css/fonts/iconpicker.svg create mode 100644 assets/css/fonts/iconpicker.ttf create mode 100644 assets/css/fonts/iconpicker.woff create mode 100644 assets/css/fonts/woomail-social.eot create mode 100644 assets/css/fonts/woomail-social.svg create mode 100644 assets/css/fonts/woomail-social.ttf create mode 100644 assets/css/fonts/woomail-social.woff create mode 100644 assets/css/fonts/woomail-social.woff2 create mode 100644 assets/fonts/iconpicker.eot create mode 100644 assets/fonts/iconpicker.svg create mode 100644 assets/fonts/iconpicker.ttf create mode 100644 assets/fonts/iconpicker.woff create mode 100644 assets/images/WooCommerce-wordpress-01.png create mode 100644 assets/images/WooCommerce-wordpress-02.png create mode 100644 assets/images/attendees.xlsx create mode 100644 assets/images/black/digg.png create mode 100644 assets/images/black/dribbble.png create mode 100644 assets/images/black/facebook.png create mode 100644 assets/images/black/google-plus.png create mode 100644 assets/images/black/instagram.png create mode 100644 assets/images/black/link.png create mode 100644 assets/images/black/linkedin.png create mode 100644 assets/images/black/pinterest.png create mode 100644 assets/images/black/rss.png create mode 100644 assets/images/black/stumbleupon.png create mode 100644 assets/images/black/tumblr.png create mode 100644 assets/images/black/twitter.png create mode 100644 assets/images/black/vimeo.png create mode 100644 assets/images/black/vk.png create mode 100644 assets/images/black/whatsapp.png create mode 100644 assets/images/black/youtube.png create mode 100644 assets/images/gray/digg.png create mode 100644 assets/images/gray/dribbble.png create mode 100644 assets/images/gray/facebook.png create mode 100644 assets/images/gray/google-plus.png create mode 100644 assets/images/gray/instagram.png create mode 100644 assets/images/gray/link.png create mode 100644 assets/images/gray/linkedin.png create mode 100644 assets/images/gray/pinterest.png create mode 100644 assets/images/gray/rss.png create mode 100644 assets/images/gray/stumbleupon.png create mode 100644 assets/images/gray/tumblr.png create mode 100644 assets/images/gray/twitter.png create mode 100644 assets/images/gray/vimeo.png create mode 100644 assets/images/gray/vk.png create mode 100644 assets/images/gray/whatsapp.png create mode 100644 assets/images/gray/youtube.png create mode 100644 assets/images/icon-128x128.png create mode 100644 assets/images/image-1-01.png create mode 100644 assets/images/image-2-02.png create mode 100644 assets/images/kt_flat_template.jpg create mode 100644 assets/images/kt_full_template.jpg create mode 100644 assets/images/kt_skinny_template.jpg create mode 100644 assets/images/white/digg.png create mode 100644 assets/images/white/dribbble.png create mode 100644 assets/images/white/facebook.png create mode 100644 assets/images/white/google-plus.png create mode 100644 assets/images/white/instagram.png create mode 100644 assets/images/white/link.png create mode 100644 assets/images/white/linkedin.png create mode 100644 assets/images/white/pinterest.png create mode 100644 assets/images/white/rss.png create mode 100644 assets/images/white/stumbleupon.png create mode 100644 assets/images/white/tumblr.png create mode 100644 assets/images/white/twitter.png create mode 100644 assets/images/white/vimeo.png create mode 100644 assets/images/white/vk.png create mode 100644 assets/images/white/whatsapp.png create mode 100644 assets/images/white/youtube.png create mode 100644 assets/js/customizer-range-value-control.js create mode 100644 assets/js/customizer-repeater-control.js create mode 100644 assets/js/customizer-scripts.js create mode 100644 assets/js/customizer-toggle-switch-control.js create mode 100644 includes/class-customizer-mailtplimportexport-control.php create mode 100644 includes/class-customizer-mailtplinfoblock-control.php create mode 100644 includes/class-customizer-mailtplsendemail-control.php create mode 100644 includes/class-customizer-mailtpltemplateload-control.php create mode 100644 includes/class-customizer-range-value-control.php create mode 100644 includes/class-customizer-repeater-control.php create mode 100644 includes/class-customizer-toggle-control.php create mode 100644 includes/class-mailtpl-woomail-customizer.php create mode 100644 includes/class-mailtpl-woomail-import-export.php create mode 100644 includes/class-mailtpl-woomail-import-option.php create mode 100644 includes/class-mailtpl-woomail-preview.php create mode 100644 includes/class-mailtpl-woomail-settings.php create mode 100644 includes/class-mailtpl-woomail-woo.php create mode 100644 preview.php create mode 100644 templates/wcmp/vendor-new-order.php create mode 100644 templates/woo/emails/admin-cancelled-order.php create mode 100644 templates/woo/emails/admin-failed-order.php create mode 100644 templates/woo/emails/admin-new-order.php create mode 100644 templates/woo/emails/admin-new-renewal-order.php create mode 100644 templates/woo/emails/admin-payment-retry.php create mode 100644 templates/woo/emails/cancelled-subscription.php create mode 100644 templates/woo/emails/customer-completed-order.php create mode 100644 templates/woo/emails/customer-completed-renewal-order.php create mode 100644 templates/woo/emails/customer-completed-switch-order.php create mode 100644 templates/woo/emails/customer-invoice.php create mode 100644 templates/woo/emails/customer-new-account.php create mode 100644 templates/woo/emails/customer-note.php create mode 100644 templates/woo/emails/customer-on-hold-order.php create mode 100644 templates/woo/emails/customer-payment-retry.php create mode 100644 templates/woo/emails/customer-processing-order.php create mode 100644 templates/woo/emails/customer-processing-renewal-order.php create mode 100644 templates/woo/emails/customer-refunded-order.php create mode 100644 templates/woo/emails/customer-renewal-invoice.php create mode 100644 templates/woo/emails/customer-reset-password.php create mode 100644 templates/woo/emails/email-addresses.php create mode 100644 templates/woo/emails/email-customer-details.php create mode 100644 templates/woo/emails/email-downloads.php create mode 100644 templates/woo/emails/email-footer.php create mode 100644 templates/woo/emails/email-header.php create mode 100644 templates/woo/emails/email-order-details.php create mode 100644 templates/woo/emails/email-order-items.php create mode 100644 templates/woo/emails/email-styles.php create mode 100644 templates/woo/emails/subscription-info.php create mode 100644 templates/woo/emails/waitlist-mailout.php create mode 100644 wpml-config.xml diff --git a/README.txt b/README.txt index ca54b89..8116da4 100755 --- a/README.txt +++ b/README.txt @@ -1,9 +1,9 @@ -=== Email Templates === +=== Email Templates Customizer and Designer for WordPress and WooCommerce === Contributors: wpexpertsio -Tags: email templates, email template, html email, email template, template, better emails, wp better emails, wp email templates, html emails, postman, wp smtp, woocommerce, easy digital downloads -Requires at least: 4.0 -Tested up to: 5.9 -Stable tag: 1.3.2.1 +Tags: Email templates, email designer, email customizer, email, woocommerce email +Requires at least: 7.4 +Tested up to: 6.1.1 +Stable tag: 1.4 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -37,7 +37,8 @@ Send your translations to [Transifex](https://www.transifex.com/projects/p/wp-em 1. Upload the plugin in /wp-admin/plugin-install.php 2. Activate the plugin through the 'Plugins' menu in WordPress -3. Click on Appearance -> "Email Templates" to start editing +3. Click on Email Templates -> "WordPress Email" to start editing +4. Click on Email Templates -> "WooCommerce Email" to start editing == Frequently Asked Questions == @@ -54,9 +55,20 @@ Copy the templates folder into your theme , then in functions.php add the follow 1. Email Templates - Settings 2. Boxed layout 3. Full-width layout +4. Email Notification +5. Email Type +6. Background Color +7. Bundle Icon +8. Send Preview Email +9. Email Type and Text +10. Font Family +11. WooCommerce Emails == Changelog == += 1.4 = +* NEW - WooCommerce Email Customizer Added + = 1.3.2.1 = * Emails not being send when multiple emails where being sent at the same time diff --git a/admin/class-mailtpl-admin.php b/admin/class-mailtpl-admin.php index 3c86e76..5785faa 100755 --- a/admin/class-mailtpl-admin.php +++ b/admin/class-mailtpl-admin.php @@ -8,7 +8,7 @@ * * @package Mailtpl * @subpackage Mailtpl/admin - * @author Damian Logghe + * @author wpexperts */ class Mailtpl_Admin { @@ -43,15 +43,133 @@ public function __construct( $plugin_name, $version ) { $this->version = $version; } - + public function email_template() { + $link = $this->get_customizer_link(); + ?> + + +
+
+

+ + Email Templates +

+
+
+
+
+ +

WordPress Email Templates

+

Live preview your WordPress emails.

+

Customize emails to match your brand colors.

+

Customize heading, subtitle, and body text.

+

Design and send custom-built emails with WordPress Email Templates.

+

Choose your template style, add a logo or some text, change colors, edit footer and start sending nice emails in WordPress.

+
+ + + +
+
+
+ +

WooCommerce Email Templates

+

Customize the default transactional emails.

+

Live preview your WooCommerce emails.

+

Export and import your plugin settings.

+

Design and customize WooCommerce's default transactional email templates.

+

Use WordPress's native customizer for visual edits and customize the text (including body text) in WooCommerce without editing code.

+
+ + + +
+
+
+ get_customizer_link(); - add_submenu_page( 'themes.php', 'Email Templates', 'Email Templates', apply_filters( 'mailtpl/roles', 'edit_theme_options'), $link , null ); - + public function add_menu_link() { + + add_menu_page( + esc_html__( 'Email Templates', 'mailtpl-woocommerce-email-composer' ), + esc_html__( 'Email Templates', 'mailtpl-woocommerce-email-composer' ), + 'manage_woocommerce', + 'email-Template', + array( $this,'email_template' ), + 'dashicons-email', + 52 + ); } /** * If we are in our template strip everything out and leave it clean @@ -142,7 +260,7 @@ public function wp_pointers() { wp_enqueue_style( 'wp-pointer' ); // Add pointers script to queue. Add custom script. - wp_enqueue_script( 'mailtpl-pointer', MAILTPL_PLUGIN_URL . '/admin/js/mailtpl-pointer.js', array( 'wp-pointer' ) ); + wp_enqueue_script( 'mailtpl-pointer', MAILTPL_WOOMAIL_URL . '/admin/js/mailtpl-pointer.js', array( 'wp-pointer' ) ); // Add pointer options to script. wp_localize_script( 'mailtpl-pointer', 'mailtpl_pointer', $valid_pointers ); @@ -204,7 +322,7 @@ function woocommerce_integration( $WC_Emails ) { remove_filter( 'mailtpl/email_content', 'convert_chars' ); remove_filter( 'mailtpl/email_content', 'wpautop' ); remove_action('woocommerce_email_header', array($WC_Emails , 'email_header')); - remove_action('woocommerce_email_footer', array($WC_Emails , 'email_footer')); + //remove_action('woocommerce_email_footer', array($WC_Emails , 'email_footer')); } diff --git a/admin/js/mailtpl-admin.js b/admin/js/mailtpl-admin.js index e2f42aa..f19eccd 100755 --- a/admin/js/mailtpl-admin.js +++ b/admin/js/mailtpl-admin.js @@ -1,24 +1,12 @@ (function( $ ) { $(window).load(function () { - - wp.customize.panel( 'mailtpl' ).focus(); $('.mailtpl_range').on('input',function(){ var val = $(this).val(); $(this).parent().find('.font_value').html(val); $(this).val(val); }); - $('#mailtpl-send_mail').on('click', function(e){ - e.preventDefault(); - $('#mailtpl-spinner').fadeIn(); - $.ajax({ - url : ajaxurl, - data : { action: 'mailtpl_send_email' } - }).done(function(data) { - $('#mailtpl-spinner').fadeOut(); - $('#mailtpl-success').fadeIn().delay(3000).fadeOut(); - }); - }); + if( $('#customize-control-mailtpl_template select').val() != 'boxed' ) { $('#customize-control-mailtpl_body_size').hide(); } @@ -31,4 +19,18 @@ }); }); + $( document ).ready( function() { + $(document).on('click', '#mailtpl-send_mail', function(e){ + e.preventDefault(); + $('#mailtpl-spinner').fadeIn(); + $.ajax({ + url : ajaxurl, + data : { action: 'mailtpl_send_email' } + }).done(function(data) { + $('#mailtpl-spinner').fadeOut(); + $('#mailtpl-success').fadeIn().delay(3000).fadeOut(); + }); + }); + } ); + })( jQuery ); diff --git a/admin/templates/partials/default-message.php b/admin/templates/partials/default-message.php index 6563a66..6ebf00e 100644 --- a/admin/templates/partials/default-message.php +++ b/admin/templates/partials/default-message.php @@ -4,7 +4,9 @@

Placeholders

-