WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Email Invoice function not working (8 posts)

  1. bheadrick
    Member
    Posted 1 year ago #

    I don't think I've ever been able to get the email invoice function to work.

    Emails do get sent to the customer and to the admin when a purchase is made, so obviously email in general is working, but no email ever gets sent when I click the "email invoice" button on the order with or without making an update to the order - like the status or the amount due.

    There doesn't appear to be any logging for this, so I don't really know how to trace what's going wrong short of picking apart the code...

    http://wordpress.org/extend/plugins/woocommerce/

  2. bheadrick
    Member
    Posted 1 year ago #

    apparently, I just needed to deactivate and reactivate the plugin.

  3. Jason
    Member
    Posted 1 year ago #

    That didn't work for me. Still not working.

  4. barnabasnagy
    Member
    Posted 1 year ago #

    Not working for me!

  5. sunnysidesoft
    Member
    Posted 1 year ago #

    I opened up the woocommerce source file and found the reason of the problem.
    This problem caused because woocommerce sending email to user based on email in the order billing information, not in the user information.

    Following procedure will solve the problem.

    1. Open up the plugin/woocommerce/classes/class-wc-order.php

    2. Fine codes shown in the first line below and then replace them with second line.
    //original
    $this->send( $order->billing_email, $subject, $message, $headers, $attachments );

    //replacement
    $this->send( get_userdata($order->user_id)->user_email, $subject, $message, $headers, $attachments );

  6. bheadrick
    Member
    Posted 1 year ago #

    not everyone that creates an order will create a user, and if a user account does exist, the email on the order will not differ from it unless someone manually changes it.

  7. YujiSato
    Member
    Posted 1 year ago #

    Sorry my english... i´m a brazilian guy

    I solved the mystery ... go in the Woocommerce´s options emails and change the "Email Sender Options" to "wordpress@yourdomain.com" ...its look like stupid but really work!

  8. YujiSato
    Member
    Posted 1 year ago #


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags