Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Woocommerce emails

$
0
0

Replies: 0

Trying to get woocommerce email add_filter to work.
Doesn’t seem to work with WP Mail SMTP. How can I fix this?

following code added into my functions.php file

add_filter( 'woocommerce_email_from_address', function( $from_email, $wc_email ){
    if( $wc_email->id == 'customer_new_account' || $wc_email->id == 'customer_note' || $wc_email->id =='new_order')
        $from_email = 'no-reply@mydomain.com';
        
    return $from_email;
}, 10, 2 );

Viewing all articles
Browse latest Browse all 59525

Trending Articles