New Email Template Based On Custom State
-
Hi!
I have two custom order status, I send another email based on status. my problem is that I want to create an email template (not overwrite).
I tried specifying the “default path” or “plugin path” to the function “wc_get_template” example:
wc_get_template( “emails/customer-custom-notification-order.php”, array( ‘order’ => $this->object, ‘email_heading’ => $this->get_heading(), ‘sent_to_admin’ => false, ‘plain_text’ => false ), ‘/wp-content/plugins/myplugin/woocommerce/’, ‘/wp-content/plugins/myplugin/woocommerce/’ );
or using the filter “woocommerce_locate_template” :
if ( $template_name == ‘emails/customer-custom-notification-order.php’ ) { $template = “/wp-content/plugins/myplugin/woocommerce/emails/customer-custom-notification-order.php’”; } return $template;
but always get the message that the template is not found. please anyone who can help
- The topic ‘New Email Template Based On Custom State’ is closed to new replies.