Merge pull request #5195 from bolderelements/patch-1
Update abstract-wc-email.php
This commit is contained in:
commit
d9eff07669
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue