update_status function in class-wc-order.php will cause undesirable post insertion if we don't check if the order id exist

we need $this->id check in the update_status function to prevent an empty WC_Order object from calling it. If $this->id doesn't exists, update_status will insert another row in wp_posts because line 1226: wp_update_post(array('ID' => $this->id)) triggers it.