• I think it would be helpful to add email message to buyer with download link too.

    I replaced line 140 of paypal-for-digital-goods.php onwards with this. Would you add it? Maybe even an option to send/not send!

      //email message to buyer and admin
        $thank_you_msg = apply_filters('wp_ppdg_thank_you_message', $thank_you_msg);
        $res[ 'msg' ] = $thank_you_msg;
        add_filter( 'wp_mail_content_type', 'wp_ppdg_set_html_mail_content_type' );
     
        $to = $payment[ 'payer' ]['payer_info'][ 'email' ];
        $subject = sprintf(__('Thank you for your purchase of %1$s','ppdg_locale'),$item_name);
        $body = $thank_you_msg;
        $headers=array();
        $headers[] = 'From: '.get_bloginfo('name').' <'.get_option('admin_email').'>' . "\r\n";
        $headers[] = 'Cc: '.get_bloginfo('name').' <'.get_option('admin_email').'>' . "\r\n";
        wp_mail( $to, $subject, $body,$headers );
        remove_filter( 'wp_mail_content_type','wp_ppdg_set_html_mail_content_type' );
        
        echo json_encode( $res );
    
        wp_die();
    }
    function wp_ppdg_set_html_mail_content_type() {
        return 'text/html';
    }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add email send to buyer’ is closed to new replies.