Forum Replies Created

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

    (@websolutions-aba)

    Thank you for answering so fast!!!!
    I have to apologize.It was a coincidence that in all the tests every time I activated the plugin.Day Delivery wasn’t the cause.The issue was SSL/email.
    I really appreciate your concern and help.
    Again my apologies.
    Regards.
    Belén

    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 2 replies - 1 through 2 (of 2 total)