Tag Info

New answers tagged

1

I finally tried using var_dump() on $item and $_product, which are both used in the email-order-items.php template. $_product revealed a post object, which itself has a post_excerpt property, which looks like it holds the contents of the "Product Short Description" from the WooCommerce product form. So, to add the description beneath the item name, I added ...


0

To customize your registration form, follow the instructions outlined here - Customizing the Registration Form. Note that your requirements are unusual so your customization will be more extensive. AFAIK you will need to provide a fake email address per account. You can use javascript in the registration form to fill-in necessary data (e.g. email ...


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).


0

with the 4th parameter of wp_mail() you can extend the header of the Email. So you can use BCC there. This should work: <?php $bcc = 'Bcc: '; $i = 0; foreach( $emails as $email ){ if( $i != 0 ) $bcc .= ', '; $bcc .= $email; $i = 1; } $headers[] = $bcc; wp_mail( 'admin@mysite.com', 'New entry!', ...


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; } ...


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 = ...


0

Thanks guys! I was debugging an contact-form-7 error. This helped me a lot. It appeared that the sender was a (persons) name and not an emailadress, alltough we were using the wpmail() -> mail() it did sent out the mail but reported a false to the CF-7 plugin, showing an error to the visitor who filled in the form.


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 = ...


0

you could use this filter: comment_notification_headers for reference: https://core.trac.wordpress.org/browser/tags/4.1/src/wp-includes/pluggable.php#L1434 line: 1434 and 1471


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 = ...



Top 50 recent answers are included