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

Add Blog page in Breadcrumbs

add_filter( ‘aioseo_breadcrumbs_trail’, function( $crumbs ) { if(is_singular(‘post’) || is_category()){ $blog = [ ‘label’ => ‘Blog’, ‘link’ => ‘https://lawsuitanalysis.com/blog/’, ‘type’ => ” ]; array_splice( $crumbs, 1, 0, [$blog] ); } return $crumbs; }, 10, 2);Continue reading

Allow SVG Files Upload (copy)

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

Milestone Sales Alert

function sumobi_edd_milestone_sales_alert( $purchase_id ) { // ID of download to check $download_id = 8; // sales milestone to reach $milestone = 100; // email/s to send the notification to. Add more emails to array if neccessary $send_to = get_option( ‘admin_email’…Continue reading

Customize User Verification Email

function jp_customize_verification_email( $message, $user_id ) { $user_data = get_userdata( $user_id ); $url = edd_get_user_verification_url( $user_id ); $from_name = edd_get_option( ‘from_name’, wp_specialchars_decode( get_bloginfo( ‘name’ ), ENT_QUOTES ) ); $message = sprintf( __( “Howdy %s,\n\nYour account with %s needs to be verified…Continue reading