Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter givenly

    (@givenly)

    Hi,
    I have updated the status of the order in this way:

    
    $order = wc_get_order($orderId);
    if ($order) {
        $order->update_status($newOrderStatus, '(by cron)');
    }
    

    or

    
    $order = new WC_Order($orderId);
    if ($order) {
        $order->update_status($newOrderStatus, '(by cron)');
    }
    

    This code has updated the status but email does not sends.

    Please advise.

Viewing 1 replies (of 1 total)