{"id":378236,"date":"2023-06-26T13:26:33","date_gmt":"2023-06-26T13:26:33","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=378236"},"modified":"2024-06-06T06:31:49","modified_gmt":"2024-06-06T06:31:49","slug":"how-to-create-custom-email-templates-in-woocommerce","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/","title":{"rendered":"How to Create Custom Email Templates in WooCommerce?"},"content":{"rendered":"\n<p>We will learn how to create custom email templates in WooCommerce. A custom email template is an email template that a company creates using its own brand identity such as colors, fonts and etc.<\/p>\n\n\n\n<p>If you require expert assistance or want to develop custom unique functionality,<a href=\"https:\/\/webkul.com\/hire-woocommerce-developers\/\" target=\"_blank\" rel=\"noreferrer noopener\">&nbsp;hire WooCommerce Developers<\/a>&nbsp;for your project.<\/p>\n\n\n\n<p>To create a custom email template in WooCommerce, you can follow these steps:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1. Creating the new plugin for  Custom Email Templates<\/h2>\n\n\n\n<p>First, we will create a plugin to create custom email templates.&#8217;function.php&#8217; is the root file of the plugin. It contains a custom menu page.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\/**\n * Plugin Name: WooCommerce Template\n * Version: 1.0.0\n * Author: Webkul\n * Author URI: http:\/\/webkul.com\n * Plugin URI: http:\/\/webkul.com\/#\n * Domain Path: \/languages\/\n * Text Domain: webkul\n *\n * @package WooCommerce\n *\/\n\nuse EMAILSYSTEM\\Emails\\WB_Email;\n\ndefined( &#039;ABSPATH&#039; ) || exit();\n! defined( &#039;WB_PLUGIN_FILE&#039; ) &amp;&amp; define( &#039;WB_PLUGIN_FILE&#039;, plugin_dir_path( __FILE__ ) );\n\nclass Main_Class {\n\n\t\/**\n\t * constructor\n\t *\/\n\tpublic function __construct() {\n\t\tadd_action( &#039;admin_menu&#039;, array( $this, &#039;wb_custom_menu_page&#039; ) );\n\t}\n\n\t\/**\n\t * Register a custom menu page.\n\t *\/\n\tfunction wb_custom_menu_page() {\n\t\tadd_menu_page( esc_html__( &#039;Email&#039;, &#039;webkul&#039; ), esc_html__( &#039;Email System&#039;, &#039;webkul&#039; ), &#039;manage_options&#039;, &#039;email-menu&#039;, array( $this, &#039;my_custom_menu_page&#039; ), &#039;dashicons-email&#039;, 59 );\n\t}\n\n\t\/**\n\t * Display a custom menu page\n\t *\/\n\tfunction my_custom_menu_page() {\n\t\tinclude WB_PLUGIN_FILE . &#039;emails\/class-wb-email.php&#039;;\n\t\t$mail = new WB_Email();\n\t\t$mail-&gt;get_template();\n\t}\n\n}\nnew Main_Class();<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2. Creating the Custom Email Manager for custom email template<\/h2>\n\n\n\n<p>The 2nd thing that we need to create an email manager class. This class would queue up all custom emails in the WooCommerce email queue. In our case, Admin sends the email manually to users.<\/p>\n\n\n\n<p>Create the class-wb-email.php file in the&nbsp;<strong>\/emails\/<\/strong>&nbsp;folder of your plugin and put The below code in the file of the plugin &#8216;<strong>\/emails\/<\/strong>&nbsp;class-wb-email.php&#8217;.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\/**\n * Send Email To User User.l\n *\/\n\nnamespace EMAILSYSTEM\\Emails;\n\nuse EMAILSYSTEM\\Emails\\Custom_Email;\n\ndefined( &#039;ABSPATH&#039; ) || exit;\n\nif ( ! class_exists( &#039;WB_Email&#039; ) ) {\n\t\/**\n\t * Send Email To User\n\t *\/\n\tclass WB_Email {\n\n\t\t\/**\n\t\t * Transaction class object.\n\t\t *\n\t\t * @var object  $helper Transaction class object.\n\t\t *\/\n\t\tprotected $helper;\n\n\t\t\/**\n\t\t * Construct\n\t\t *\/\n\t\tpublic function __construct() {\n\n\t\t\tinclude WB_PLUGIN_FILE . &#039;emails\/class-custom-email.php&#039;;\n\t\t\t$this-&gt;helper = new Custom_Email();\n\t\t\t$this-&gt;wb_process_request();\n\n\t\t}\n\n\t\t\/**\n\t\t * Process request\n\t\t *\n\t\t * @return void\n\t\t *\/\n\t\tpublic function wb_process_request() {\n\n\t\t\tif ( ! empty( $_POST&#091;&#039;wb-email-submit&#039;] ) ) {\n\t\t\t\t$this-&gt;wb_validate_request( $_POST );\n\t\t\t}\n\n\t\t}\n\n\t\t\/**\n\t\t * Template\n\t\t *\n\t\t * @return void\n\t\t *\/\n\t\tpublic function get_template() {\n\t\t\t?&gt;\n\t\t\t&lt;div class=&quot;wrap&quot;&gt;\n\t\t\t\t&lt;form method=&quot;post&quot; id=&quot;customer-email&quot;&gt;\n\t\t\t\t\t&lt;h1&gt;&lt;?php echo esc_html__( &#039;Send Email To User&#039;, &#039;webkul&#039; ); ?&gt;&lt;\/h1&gt;\n\t\t\t\t\t&lt;p&gt;&lt;?php esc_html_e( &#039;Admin can send email manually to users.&#039;, &#039;webkul&#039; ); ?&gt;&lt;\/p&gt;\n\t\t\t\t\t&lt;table class=&quot;form-table&quot;&gt;\n\t\t\t\t\t\t&lt;tbody&gt;\n\t\t\t\t\t\t\t&lt;tr valign=&quot;top&quot;&gt;\n\t\t\t\t\t\t\t\t&lt;th scope=&quot;row&quot; class=&quot;titledesc&quot;&gt;\n\t\t\t\t\t\t\t\t\t&lt;label for=&quot;webkul-user&quot;&gt;&lt;?php echo esc_html__( &#039;User&#039;, &#039;webkul&#039; ); ?&gt;&lt;\/label&gt;\n\t\t\t\t\t\t\t\t&lt;\/th&gt;\n\t\t\t\t\t\t\t\t&lt;td&gt;\n\t\t\t\t\t\t\t\t\t&lt;input type=&quot;text&quot; class=&quot;regular-text&quot; name=&quot;webkul-user&quot; id=&quot;webkul-user&quot; title=&quot;&lt;?php echo esc_html__( &#039;User&#039;, &#039;webkul&#039; ); ?&gt;&quot; placeholder=&quot;Username or email&quot;&gt;\n\t\t\t\t\t\t\t\t&lt;\/td&gt;\n\t\t\t\t\t\t\t&lt;\/tr&gt;\n\t\t\t\t\t\t\t&lt;tr valign=&quot;top&quot;&gt;\n\t\t\t\t\t\t\t\t&lt;th scope=&quot;row&quot; class=&quot;titledesc&quot;&gt;\n\t\t\t\t\t\t\t\t\t&lt;label for=&quot;webkul-email-subject&quot;&gt;&lt;?php echo esc_html__( &#039;Subject&#039;, &#039;webkul&#039; ); ?&gt;&lt;\/label&gt;\n\t\t\t\t\t\t\t\t&lt;\/th&gt;\n\t\t\t\t\t\t\t\t&lt;td&gt;\n\t\t\t\t\t\t\t\t\t&lt;input type=&quot;text&quot; class=&quot;regular-text&quot; name=&quot;webkul-email-subject&quot; id=&quot;webkul-email-subject&quot; &gt;\n\t\t\t\t\t\t\t\t&lt;\/td&gt;\n\t\t\t\t\t\t\t&lt;\/tr&gt;\n\t\t\t\t\t\t\t&lt;tr valign=&quot;top&quot;&gt;\n\t\t\t\t\t\t\t\t&lt;th scope=&quot;row&quot; class=&quot;titledesc&quot;&gt;\n\t\t\t\t\t\t\t\t\t&lt;label for=&quot;webkul-message&quot;&gt;&lt;?php echo esc_html__( &#039;Mesaage&#039;, &#039;webkul&#039; ); ?&gt;&lt;\/label&gt;\n\t\t\t\t\t\t\t\t&lt;\/th&gt;\n\t\t\t\t\t\t\t\t&lt;td&gt;\n\t\t\t\t\t\t\t\t\t&lt;?php\n\t\t\t\t\t\t\t\t\t$id       = &#039;webkul-message&#039;;\n\t\t\t\t\t\t\t\t\t$settings = array(\n\t\t\t\t\t\t\t\t\t\t&#039;tinymce&#039;       =&gt; true,\n\t\t\t\t\t\t\t\t\t\t&#039;textarea_name&#039; =&gt; &#039;webkul-message&#039;,\n\t\t\t\t\t\t\t\t\t\t&#039;media_buttons&#039; =&gt; false,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\twp_editor( &#039;&#039;, $id, $settings );\n\t\t\t\t\t\t\t\t\t?&gt;\n\t\t\t\t\t\t\t\t&lt;\/td&gt;\n\t\t\t\t\t\t\t&lt;\/tr&gt;\n\t\t\t\t\t\t&lt;\/tbody&gt;\n\t\t\t\t\t&lt;\/table&gt;\n\t\t\t\t\t&lt;div class=&quot;action-submit&quot;&gt;\n\t\t\t\t\t\t&lt;?php\n\t\t\t\t\t\t\tsubmit_button( esc_html__( &#039;Send email&#039;, &#039;webkul&#039; ), &#039;primary&#039;, &#039;wb-email-submit&#039; );\n\t\t\t\t\t\t?&gt;\n\t\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;\/form&gt;\n\t\t\t&lt;\/div&gt;\n\t\t\t&lt;?php\n\t\t}\n\n\t\t\/**\n\t\t * Validate Email function\n\t\t *\n\t\t * @param array $data Email form data.\n\t\t * @return void\n\t\t *\/\n\t\tpublic function wb_validate_request( $data ) {\n\n\t\t\t$mesg    = esc_html__( &#039;User filed is mandatory.&#039;, &#039;webkul&#039; );\n\t\t\t$user    = ! empty( $data&#091;&#039;webkul-user&#039;] ) ? $data&#091;&#039;webkul-user&#039;] : $this-&gt;wb_print_notification( $mesg, 1 );\n\t\t\t$subject = isset( $data&#091;&#039;webkul-email-subject&#039;] ) ? sanitize_text_field( $data&#091;&#039;webkul-email-subject&#039;] ) : &#039;&#039;;\n\t\t\t$message = isset( $data&#091;&#039;webkul-message&#039;] ) ? sanitize_text_field( $data&#091;&#039;webkul-message&#039;] ) : &#039;&#039;;\n\n\t\t\tif ( ! empty( $user ) ) {\n\t\t\t\t$user_data = get_user_by( &#039;email&#039;, $user );\n\t\t\t\t$user_data = ! empty( $user_data ) ? $user_data : get_user_by( &#039;login&#039;, $user );\n\t\t\t\tif ( ! empty( $user_data ) ) {\n\t\t\t\t\t$email = $user_data-&gt;user_email;\n\t\t\t\t} else {\n\t\t\t\t\t$mesg = esc_html__( &#039;User is not exist&#039;, &#039;webkul&#039; );\n\t\t\t\t\t$this-&gt;wb_print_notification( $mesg, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( empty( $subject ) ) {\n\t\t\t\t$mesg = esc_html__( &#039;Subject is mandatory&#039;, &#039;webkul&#039; );\n\t\t\t\t$this-&gt;wb_print_notification( $mesg, 1 );\n\t\t\t}\n\n\t\t\tif ( empty( $message ) ) {\n\t\t\t\t$mesg = esc_html__( &#039;Message is mandatory&#039;, &#039;webkul&#039; );\n\t\t\t\t$this-&gt;wb_print_notification( $mesg, 1 );\n\t\t\t}\n\n\t\t\tif ( ! empty( $email ) &amp;&amp; ! empty( $subject ) &amp;&amp; ! empty( $message ) ) {\n\t\t\t\t$this-&gt;helper-&gt;trigger( $email, $subject, $message );\n\t\t\t\t$mesg = esc_html__( &#039;Mail send successfully.&#039;, &#039;webkul&#039; );\n\t\t\t\t$this-&gt;wb_print_notification( $mesg, 0 );\n\t\t\t}\n\t\t}\n\n\t\t\/**\n\t\t * Print notification.\n\t\t *\n\t\t * @param string $message Error message.\n\t\t * @return void\n\t\t *\/\n\t\tpublic function wb_print_notification( $message, $error_code ) {\n\n\t\t\tif ( 0 === $error_code ) {\n\t\t\t\t?&gt;\n\t\t\t\t&lt;div class=&#039;notice notice-success is-dismissible&#039;&gt;\n\t\t\t\t\t&lt;p&gt;&lt;?php echo esc_html( $message ); ?&gt;&lt;\/p&gt;\n\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;?php\n\t\t\t} elseif ( 1 === $error_code ) {\n\t\t\t\t?&gt;\n\t\t\t\t&lt;div class=&#039;notice notice-error is-dismissible&#039;&gt;\n\t\t\t\t\t&lt;p&gt;&lt;?php echo esc_html( $message ); ?&gt;&lt;\/p&gt;\n\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;?php\n\t\t\t}\n\n\t\t}\n\t}\n}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3. Creating the Email class<\/h2>\n\n\n\n<p>Create an email class for each of our custom emails. This class will extend the&nbsp;<strong><a href=\"https:\/\/woocommerce.github.io\/code-reference\/classes\/WC-Email.html\" target=\"_blank\" rel=\"noreferrer noopener sponsored nofollow\">WC_Email<\/a><\/strong>&nbsp;class.<\/p>\n\n\n\n<p>Create the class-custom-email.php file in the&nbsp;<strong>\/emails\/<\/strong>&nbsp;folder of your plugin.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" width=\"330\" height=\"102\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07.png\" alt=\"custom email template in WooCommerce\" class=\"wp-image-380235\" style=\"width:588px;height:181px\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07.png 330w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07-300x93.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07-250x77.png 250w\" sizes=\"(max-width: 330px) 100vw, 330px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p><strong>class-custome-email.php<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\/**\n * Send Email.\n *\/\n\nnamespace EMAILSYSTEM\\Emails;\n\ndefined( &#039;ABSPATH&#039; ) || exit;\n\nif ( ! class_exists( &#039;Custom_Email&#039; ) ) {\n\t\/**\n\t * Send Email\n\t *\/\n\tclass Custom_Email extends \\WC_Email {\n\n\t\t\/**\n\t\t * Constructor of the class.\n\t\t *\/\n\t\tpublic function __construct() {\n\n\t\t\t$this-&gt;enabled       = true;\n\t\t\t$this-&gt;id            = &#039;new_query&#039;;\n\t\t\t$this-&gt;title         = esc_html__( &#039;Webkul Mail&#039;, &#039;webkul&#039; );\n\t\t\t$this-&gt;description   = esc_html__( &#039;Query emails are sent to chosen recipient(s) &#039;, &#039;webkul&#039; );\n\t\t\t$this-&gt;heading       = esc_html__( &#039;Webkul Mail&#039;, &#039;webkul&#039; );\n\t\t\t$this-&gt;subject       = &#039;&#091;&#039; . get_option( &#039;blogname&#039; ) . &#039;]&#039; . esc_html__( &#039; New Query&#039;, &#039;webkul&#039; );\n\t\t\t$this-&gt;template_html = &#039;emails\/customer.php&#039;;\n\t\t\t$this-&gt;footer        = esc_html__( &#039;Thanks regarding webkul.&#039;, &#039;webkul&#039; );\n\t\t\t$this-&gt;template_base = WB_PLUGIN_FILE . &#039;templates\/&#039;;\n\t\t\t\/\/ Call parent constructor.\n\t\t\tparent::__construct();\n\t\t\t\/\/ Other settings.\n\t\t}\n\n\t\t\/**\n\t\t * Trigger.\n\t\t *\n\t\t * @param int $order_id order id\n\t\t *\/\n\t\tpublic function trigger( $email, $subject, $message ) {\n\n\t\t\tif ( ! empty( $email ) &amp;&amp; ! empty( $subject ) &amp;&amp; ! empty( $message ) ) {\n\t\t\t\t$this-&gt;recipient = $email;\n\t\t\t\t$this-&gt;data      = array(\n\t\t\t\t\t&#039;email&#039;   =&gt; $email,\n\t\t\t\t\t&#039;subject&#039; =&gt; $subject,\n\t\t\t\t\t&#039;message&#039; =&gt; $message,\n\t\t\t\t);\n\t\t\t\t$this-&gt;subject   = $subject;\n\t\t\t\t$this-&gt;heading   = $subject;\n\t\t\t\t$headers         = &#039;MIME-Version: 1.0&#039; . &quot;\\n&quot;;\n\t\t\t\t$headers        .= &#039;From: &#039; . get_option( &#039;admin_email&#039; ) . &quot;\\n&quot;;\n\t\t\t\t$headers        .= &#039;Content-type: text\/html; charset=iso-8859-1&#039; . &quot;\\n&quot;;\n\t\t\t\t$headers        .= &quot;X-Priority: 1 (Highest)\\n&quot;;\n\t\t\t\t$headers        .= &quot;X-MSMail-Priority: High\\n&quot;;\n\t\t\t\t$headers        .= &quot;Importance: High\\n&quot;;\n\t\t\t\t$this-&gt;headers   = $headers;\n\t\t\t}\n\n\t\t\tif ( $this-&gt;is_enabled() &amp;&amp; $this-&gt;get_recipient() ) {\n\t\t\t\t$this-&gt;send( $this-&gt;get_recipient(), $this-&gt;get_subject(), $this-&gt;get_content(), $this-&gt;get_headers(), $this-&gt;get_attachments() );\n\t\t\t}\n\n\t\t}\n\n\t\t\/**\n\t\t * Get content html.\n\t\t *\n\t\t * @return string\n\t\t *\/\n\t\tpublic function get_content_html() {\n\n\t\t\treturn wc_get_template_html(\n\t\t\t\t$this-&gt;template_html,\n\t\t\t\tarray(\n\t\t\t\t\t&#039;email_heading&#039;      =&gt; $this-&gt;get_heading(),\n\t\t\t\t\t&#039;admin_email&#039;        =&gt; $this-&gt;get_recipient(),\n\t\t\t\t\t&#039;data&#039;               =&gt; $this-&gt;data,\n\t\t\t\t\t&#039;blogname&#039;           =&gt; $this-&gt;get_blogname(),\n\t\t\t\t\t&#039;sent_to_admin&#039;      =&gt; false,\n\t\t\t\t\t&#039;plain_text&#039;         =&gt; false,\n\t\t\t\t\t&#039;email&#039;              =&gt; $this,\n\t\t\t\t\t&#039;additional_content&#039; =&gt; $this-&gt;get_additional_content(),\n\t\t\t\t),\n\t\t\t\t&#039;&#039;,\n\t\t\t\t$this-&gt;template_base\n\t\t\t);\n\n\t\t}\n\n\t}\n}<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4. Creating custom email templates in WooCommerce<\/h2>\n\n\n\n<p>Now we need to create email templates: <\/p>\n\n\n\n<p>Create the WooCommerce template structure, Create all email templates inside the&nbsp;<strong>templates\/emails\/<\/strong>&nbsp;folder of plugins.<\/p>\n\n\n\n<p><strong>Template, file name &#8216;customer.php.<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\/**\n * Email templates\n *\/\n\ndefined( &#039;ABSPATH&#039; ) || exit;\n\n$username          = html_entity_decode( esc_html__( &#039;Email : &#039;, &#039;webkul&#039; ), ENT_QUOTES, &#039;UTF-8&#039; );\n$user_email        = $data&#091;&#039;email&#039;];\n$user_obj          = get_user_by( &#039;email&#039;, $user_email );\n$user_name         = $user_obj-&gt;first_name ? $user_obj-&gt;first_name . &#039; &#039; . $user_obj-&gt;last_name : esc_html__( &#039;Someone&#039;, &#039;webkul&#039; );\n$admin             = html_entity_decode( esc_html__( &#039;Message : &#039;, &#039;webkul&#039; ), ENT_QUOTES, &#039;UTF-8&#039; );\n$admin_message     = html_entity_decode( $data&#091;&#039;message&#039;] );\n$reference         = html_entity_decode( esc_html__( &#039;Subject : &#039;, &#039;webkul&#039; ), ENT_QUOTES, &#039;UTF-8&#039; );\n$reference_message = html_entity_decode( $data&#091;&#039;subject&#039;], ENT_QUOTES, &#039;UTF-8&#039; );\n\ndo_action( &#039;woocommerce_email_header&#039;, $email_heading, $email );\n\n$result = &#039;&lt;p&gt;&#039; . html_entity_decode( esc_html__( &#039;Hi&#039;, &#039;webkul&#039; ), ENT_QUOTES, &#039;UTF-8&#039; ) . &#039;, &#039; . $admin_email . &#039;&lt;\/p&gt;\n\t\t   &lt;p&gt;&#039; . $admin_message . &#039;&lt;\/p&gt;&#039;;\n\nif ( isset( $additional_content ) &amp;&amp; ! empty( $additional_content ) ) {\n\t$result .= &#039;&lt;p&gt; &lt;strong&gt;&#039; . html_entity_decode( esc_html__( &#039;Additional Content : &#039;, &#039;webkul&#039; ), ENT_QUOTES, &#039;UTF-8&#039; ) . &#039;&lt;\/strong&gt;&#039; . html_entity_decode( $additional_content, ENT_QUOTES, &#039;UTF-8&#039; ) . &#039;&lt;\/p&gt;&#039;;\n}\n\necho wp_kses_post( $result );\n\ndo_action( &#039;woocommerce_email_footer&#039;, $email );<\/pre>\n\n\n\n<p><strong>The final output of this blog:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-video aligncenter\"><video height=\"740\" style=\"aspect-ratio: 1294 \/ 740;\" width=\"1294\" autoplay src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/screen_record_1687245794659.webm\"><\/video><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Support<\/h2>\n\n\n\n<p>For any technical assistance kindly <a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\" target=\"_blank\" rel=\"noreferrer noopener\">raise\u00a0a ticket<\/a>\u00a0or\u00a0reach\u00a0us by email at\u00a0support@webkul.com. Thanks for Your Time! Have a Good Day!<\/p>\n\n\n\n<p>If you want to have a <a href=\"https:\/\/webkul.com\/wordpress-theme-development-services\/\">Custom WooCommerce Theme<\/a> then feel free to reach us.<\/p>\n\n\n\n<p>Also, discover various solutions to add more features and enhance your online store by visiting the&nbsp;<a href=\"https:\/\/store.webkul.com\/woocommerce-plugins.html\" target=\"_blank\" rel=\"noreferrer noopener\">WooCommerce plugins<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We will learn how to create custom email templates in WooCommerce. A custom email template is an email template that a company creates using its own brand identity such as colors, fonts and etc. If you require expert assistance or want to develop custom unique functionality,&nbsp;hire WooCommerce Developers&nbsp;for your project. To create a custom email <a href=\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":504,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7966],"tags":[1258,13679,1501],"class_list":["post-378236","post","type-post","status-publish","format-standard","hentry","category-wordpress-woocommerce","tag-wordpress","tag-wordpress-development-services","tag-wordpress-plugin"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create Custom Email Template in WooCommerce?<\/title>\n<meta name=\"description\" content=\"Learn how to create custom email template in WooCommerce store for different purposes. Read the complete dev blog to know more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create Custom Email Template in WooCommerce?\" \/>\n<meta property=\"og:description\" content=\"Learn how to create custom email template in WooCommerce store for different purposes. Read the complete dev blog to know more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-26T13:26:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-06T06:31:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07.png\" \/>\n<meta name=\"author\" content=\"Sani Kumar Pandey\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sani Kumar Pandey\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/\"},\"author\":{\"name\":\"Sani Kumar Pandey\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/5f9d27035e753438525c6bd1883d38bb\"},\"headline\":\"How to Create Custom Email Templates in WooCommerce?\",\"datePublished\":\"2023-06-26T13:26:33+00:00\",\"dateModified\":\"2024-06-06T06:31:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/\"},\"wordCount\":329,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07.png\",\"keywords\":[\"wordpress\",\"wordpress development services\",\"wordpress plugin\"],\"articleSection\":[\"WooCommerce\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/\",\"name\":\"How to Create Custom Email Template in WooCommerce?\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07.png\",\"datePublished\":\"2023-06-26T13:26:33+00:00\",\"dateModified\":\"2024-06-06T06:31:49+00:00\",\"description\":\"Learn how to create custom email template in WooCommerce store for different purposes. Read the complete dev blog to know more.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07.png\",\"width\":330,\"height\":102,\"caption\":\"Screenshot-from-2023-05-08-11-47-07\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create Custom Email Templates in WooCommerce?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/5f9d27035e753438525c6bd1883d38bb\",\"name\":\"Sani Kumar Pandey\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/64247189d8335f5422a695ad0be257135e6141aaf069f27a205cdbbf90555797?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/64247189d8335f5422a695ad0be257135e6141aaf069f27a205cdbbf90555797?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Sani Kumar Pandey\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/sanikrpandey-wp248\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create Custom Email Template in WooCommerce?","description":"Learn how to create custom email template in WooCommerce store for different purposes. Read the complete dev blog to know more.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/","og_locale":"en_US","og_type":"article","og_title":"How to Create Custom Email Template in WooCommerce?","og_description":"Learn how to create custom email template in WooCommerce store for different purposes. Read the complete dev blog to know more.","og_url":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-06-26T13:26:33+00:00","article_modified_time":"2024-06-06T06:31:49+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07.png","type":"","width":"","height":""}],"author":"Sani Kumar Pandey","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Sani Kumar Pandey","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/"},"author":{"name":"Sani Kumar Pandey","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/5f9d27035e753438525c6bd1883d38bb"},"headline":"How to Create Custom Email Templates in WooCommerce?","datePublished":"2023-06-26T13:26:33+00:00","dateModified":"2024-06-06T06:31:49+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/"},"wordCount":329,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07.png","keywords":["wordpress","wordpress development services","wordpress plugin"],"articleSection":["WooCommerce"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/","url":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/","name":"How to Create Custom Email Template in WooCommerce?","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07.png","datePublished":"2023-06-26T13:26:33+00:00","dateModified":"2024-06-06T06:31:49+00:00","description":"Learn how to create custom email template in WooCommerce store for different purposes. Read the complete dev blog to know more.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-08-11-47-07.png","width":330,"height":102,"caption":"Screenshot-from-2023-05-08-11-47-07"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-email-templates-in-woocommerce\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Create Custom Email Templates in WooCommerce?"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/5f9d27035e753438525c6bd1883d38bb","name":"Sani Kumar Pandey","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/64247189d8335f5422a695ad0be257135e6141aaf069f27a205cdbbf90555797?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/64247189d8335f5422a695ad0be257135e6141aaf069f27a205cdbbf90555797?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Sani Kumar Pandey"},"url":"https:\/\/webkul.com\/blog\/author\/sanikrpandey-wp248\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/378236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/504"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=378236"}],"version-history":[{"count":60,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/378236\/revisions"}],"predecessor-version":[{"id":445957,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/378236\/revisions\/445957"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=378236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=378236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=378236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}