Monday, September 12, 2022
HomeWordPress DevelopmentEasy methods to change "reply to" e-mail deal with for particular Woocommerce...

Easy methods to change “reply to” e-mail deal with for particular Woocommerce merchandise


How can I run identical perform for particular product? I imply the header e-mail will change when place particular merchandise. no have to work on globally
thanks

right here is my code.

//My Code
add_filter( 'woocommerce_email_headers', 'change_reply_to_email_address', 10, 3 );
perform change_reply_to_email_address( $header, $email_id, $order,  ) {
       
    // HERE beneath set the title and the e-mail deal with
    $reply_to_name="Nil";
    $reply_to_email="nil@gmail.com";

    // Get the WC_Email occasion Object
    $e-mail = new WC_Email($email_id);

    $header  = "Content material-Kind: " . $email->get_content_type() . "rn";
    $header .= 'Reply-to: ' . $reply_to_name . ' <' . $reply_to_email . ">rn";

    return $header;
}

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments