Fixes odd premature end of headers issue

This commit is contained in:
Mike Jolley 2012-01-17 17:31:42 +00:00
parent 53e194aece
commit 41f35f172d
1 changed files with 4 additions and 1 deletions

View File

@ -96,9 +96,12 @@ class woocommerce_email {
add_filter( 'wp_mail_from_name', array(&$this, 'get_from_name') );
add_filter( 'wp_mail_content_type', array(&$this, 'get_content_type') );
// Send the mail
ob_start();
wp_mail( $to, $subject, $message, $headers, $attachments );
ob_end_clean();
// Unhook
remove_filter( 'wp_mail_from', array(&$this, 'get_from_address') );
remove_filter( 'wp_mail_from_name', array(&$this, 'get_from_name') );