Tag Info

New answers tagged

0

Your problem is with the conditional, not with the used action (I think). This line is probably not verifying in any situation: if( ( $_POST['post_status'] == 'publish' ) && ( $goalsupport === $totalsupport ) ) { I can not now what $goalsupport and $goalsupport are, both variables are undefined in your code, so I'm going to remove them. Change ...


3

An alternative is to create a simple Must-use plugin so this doesn't depend on the theme. Create a file wp-content/mu-plugins/disable-auto-update-mail.php <?php /* Plugin Name: Disable Auto Update Mails Plugin URI: http://wordpress.stackexchange.com/questions/157056 Version: 1.0 Author: kraftner AuthorURI: ...


1

Are you talking about Jetpack blog subscriptions ? if yes, you will need to insert read more tag ( <!--more--> ) where you want the post excerpt to stop, and Jetpack will do the same in the email sent to subscribers, giving them a read more link.


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



Top 50 recent answers are included