Title: givenly's Replies | WordPress.org

---

# givenly

  [  ](https://wordpress.org/support/users/givenly/)

 *   [Profile](https://wordpress.org/support/users/givenly/)
 *   [Topics Started](https://wordpress.org/support/users/givenly/topics/)
 *   [Replies Created](https://wordpress.org/support/users/givenly/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/givenly/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/givenly/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/givenly/engagements/)
 *   [Favorites](https://wordpress.org/support/users/givenly/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[YITH WooCommerce Custom Order Status] Status Emails](https://wordpress.org/support/topic/status-emails/)
 *  Thread Starter [givenly](https://wordpress.org/support/users/givenly/)
 * (@givenly)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/status-emails/#post-8291379)
 * 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)