A strange thing is happening with the woocommere_mail mail function when I try a send HTML emails.
I’m trying to get the woocommere_mail function to work with a custom HTML email template. I basically use the “save_post” hook in wordpress to send a conditional email when the admin saves a post (custom type) in the back end.
Everything seems to be set up correctly and I’m receiving the email with the details from the custom HTML template. However, it’s not sending in HTML, but plain text. Here are my two “save_post” functions for sending up to two emails when a post is saved: http://pastebin.com/BiYdM09q.
The funny thing is that if both conditions are met and both emails are sent then one comes through as HTML and the other as Plain text. It is always the second function that is the HTML email, which ever way around I put them in my functions.php. So if you look at the pastebin code, which ever of the two functions is second that email will appear as an HTML email, and the other will be plain text.
I think it may be something to do with the ob_start buffer but I’m not sure. If only one condition is met and so only one of the emails are sent, then it’s always plain, no matter which email it is.
Hmm, this is strange can you help?
- The topic ‘woocommere_mail mail function sending plain emails instead of HTML’ is closed to new replies.