• Resolved WebSolutions ABA

    (@websolutions-aba)


    I’m using Woocommerce 2.3.6.
    The Email not send new order email to the customer or the administrator.
    I have pending orders but did receive payment for those orders via a payment gateway (Ceca gateaway).I checked my email setting,I changed theme,I deactivated other plugins,I checked the gateaway,but nothing works.
    When I change the status of the order to “In progress” the email is send to both customer and admin.
    I need to send the emails to the customer and admin immediately after the order . It may cause confusion for the customer if it is not received immediately.
    How can I change the default order status in woocommerce to “In progress”?

    Thanks in advance

Viewing 1 replies (of 1 total)
  • Thread Starter WebSolutions ABA

    (@websolutions-aba)

    This is the way i solved it,maybe could help someone.It worked for me.

    Add the following code to your funtions.php (active theme):

    // Workaround for the mysterious bug in Woocommerce that prevents order emails
    // from being sent.

    add_action( ‘woocommerce_thankyou’, ‘order_email_workaround’ );

    function order_email_workaround ($order_id) {
    global $woocommerce;
    $mailer = $woocommerce->mailer();
    // Email customer with order-processing receipt
    $email = $mailer->emails[‘WC_Email_Customer_Processing_Order’];
    $email->trigger( $order_id );
    // Email admin with new order email
    $email = $mailer->emails[‘WC_Email_New_Order’];
    $email->trigger( $order_id );
    }

    add_action( ‘woocommerce_payment_complete’, ‘order_complete_email_workaround’ );

    function order_complete_email_workaround ($order_id) {
    global $woocommerce;
    $mailer = $woocommerce->mailer();
    $email = $mailer->emails[‘WC_Email_Customer_Completed_order’];
    $email->trigger( $order_id );
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Woocommerce.New order not send emails.’ is closed to new replies.