Merge pull request #5195 from bolderelements/patch-1

Update abstract-wc-email.php
This commit is contained in:
Mike Jolley 2014-03-24 10:38:47 +00:00
commit d9eff07669
1 changed files with 4 additions and 2 deletions

View File

@ -542,18 +542,20 @@ abstract class WC_Email extends WC_Settings_API {
* @param mixed $message
* @param string $headers
* @param string $attachments
* @return void
* @return bool
*/
function send( $to, $subject, $message, $headers, $attachments ) {
add_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
add_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
add_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
wp_mail( $to, $subject, $message, $headers, $attachments );
$return = wp_mail( $to, $subject, $message, $headers, $attachments );
remove_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
remove_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
remove_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
return $return;
}
/**