WC_Order::object_read issue
-
I set $order->update_status(‘completed’) in my code and discovered that the “Order Completion Email wasn’t sent”. After some digging, I found that $this->object_read property is false here: https://github.com/woocommerce/woocommerce/blob/b19500728b4b292562afb65eb3a0c0f50d5859de/includes/class-wc-order.php#L256 My “$order” object is loaded with wc_get_order() which should have populated the order object with data loaded from DB. I could do a explicit $ths->set_object_read(true) in my code prior to update_status but I am concerned about possible side effects. What is the correct approach to trigger the “order completion mail” in this case?
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WC_Order::object_read issue’ is closed to new replies.