Disable All UpdraftPlus Email Notifications

/** * Comprehensive UpdraftPlus Email Notification Disabler * Add this code to your theme’s functions.php or WPCode * By: Empathy First Media */ // Master switches and initialization prevention add_filter(‘updraftplus_disable_all_mail_init’, ‘__return_true’); // Master switch to disable email initialization add_filter(‘updraftplus_email’, ‘__return_false’);…Continue reading

Publishing email

/** * Given a Download ID being published, if it’s not the same user as logged in, send an email about it being live * * @param int $post_id The download id being published * @return void */ function cl_edd_emailNotificationDownloadPublished(…Continue reading

Sample Email Template Tag

/** * Register a custom email tag. * * @return void */ function prefix_add_sample_email_tag() { edd_add_email_tag( ‘custom_email_tag’, // Tag ‘This is a custom email tag!’, // Description ‘prefix_render_sample_email_tag’, // Callback ‘Custom Email Tag’, // Label array( ‘order’ ), // Optional…Continue reading

Vendor Email Tag

/** * @link http://sumobi.com/show-shop-vendors-email-download-purchased/ * * Example: * For more information about your order, please contact one of the following vendors: * {vendor_emails} */ /** * Add a {vendor_emails} tag */ function sumobi_edd_email_tags( $email_tags ) { $email_tags[] = array( ‘tag’…Continue reading

Disable emails on free purchases

function jp_no_email_free( $payment_id ) { $amount = edd_get_payment_amount( $payment_id ); if ( 0 == $amount ) { remove_action( ‘edd_complete_purchase’, ‘edd_trigger_purchase_receipt’, 999, 1 ); // This disables customer purchase receipts remove_action( ‘edd_admin_sale_notice’, ‘edd_admin_email_notice’, 10, 2 ); // This disables email notices…Continue reading

Pre-approval Emails

/** * Send emails when purchase is pre-approved */ function edd_pre_approval_emails_send_emails( $payment_id, $new_status, $old_status ) { // Make sure that payments are only completed once if ( $old_status == ‘publish’ || $old_status == ‘complete’ ) { return; } // Make…Continue reading

Verify Email Domain

/** * Verify the domain on the email address is at least setup with DNS * * @param bool $is_banned If the email has passed previous checks * @param string $email The email address to verify * @return bool If…Continue reading

Custom Email Template

// create the HTML for the custom template function pw_edd_custom_email_template() { echo ‘ ‘; echo ‘ ‘; echo ‘{email}’; // this tag is required in order for the contents of the email to be shown echo ‘ ‘; echo ‘…Continue reading

Downloads Email Tag

/** * Add a {downloads} tag for use in either the purchase receipt email or admin notification emails */ edd_add_email_tag( ‘downloads’, __( ‘A linked list of downloads purchased’, ‘edd’ ), ‘sumobi_edd_email_tag_downloads’ ); /** * The {downloads} email tag */ function…Continue reading