Support » Plugin: WooCommerce » Order details NOT being sent to Customer by e-mail

  • Resolved tilen

    (@tilen)


    For a specific WooCommerce project, I needed to set every new order on hold. It needs to go through that before processing payment.

    I used the following code:

    add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' );
    function custom_woocommerce_auto_complete_order( $order_id ) {
        global $woocommerce;
         if ( !$order_id )
            return;
        $order = new WC_Order( $order_id );
        $order->update_status( 'on-hold' );
    }

    and it works fine. But the problem with it is, that customers DO NOT get the “Thank you for your order” – Order details to their email addresses. Even though inside the WooCommerce settings, I have the “Order is On-Hold” e-mail message selected as “being sent to Customer”. The issue is, the customers DO NOT get these e-mails at all. But when I manually set order to “Completed” – that e-mail is being sent to customers normally, without any issues.

    How can I fix this?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Order details NOT being sent to Customer by e-mail’ is closed to new replies.