Tag Info

Hot answers tagged

2

If and when you are using wp_mail(), then you can just set Reply-To for the $headers parameter. Exemplary usage below: $to = "abc@def.gh"; $subject = "Using Reply-To with wp_mail"; $message = "This is an example for using Reply-To with wp_mail."; $headers = array( 'Reply-To' => "Name Name <ijk@lmn.op>" ); $attachments = ...


2

WordPress has built-in support for posting via email. Go to Settings > Writing in your admin and enter your credentials under "Post via e-mail". Note it won't handle Gmail labels (it only works via POP3).


1

What you need to do is to modify the code that sends the email to the author and in it set the "reply-to" header of the email, pass it as part of the headers parameters to wp-mail. Your code should be something like (adapted from the php mail function documentation). $to = 'author@example.com'; $subject = 'new comment'; $message = 'hello'; $headers = ...


1

Not sure what the WC_Email class does exactly, but if the $headers argument is an array of headers, then you're almost there. To interpolate a variable value into a string in PHP you don't have to do the <?php ... stuff because it'll be rendered as is. Instead, you can use: $headers = array( "Reply-To: {$order->billing_email}" ); Or: $headers = ...


1

The 'woocommerce_email_settings' filter is what you need. function prefix_change_from_email( $args ) { global $wpo_wcpdf; for( $i = 0; $i < sizeof( $args ); $i++ ) { if( 'woocommerce_email_from_address' == $args[ $i ]['id'] ) { $args[ $i ]['default'] = $wpo_wcpdf->billing_email(); return $args; } ...



Only top voted, non community-wiki answers of a minimum length are eligible