Bug on change of order status
-
When an order status changes to “processing”, the function wcf_ca_update_order_status() which is called by hook, attempts to retrieve an abandoned cart by calling get_captured_data_by_email() (class-cartflows-ca-cart-abandonment.php:197). The called function selects abandoned carts where order_status is WCF_CART_ABANDONED_ORDER or WCF_CART_LOST_ORDER, and does not include when order status = ‘normal’.
Line 204 later tests for order_status === WCF_CART_NORMAL_ORDER, with a true result causing a delete of the abandoned cart. This however can never evaluate to true as line 199 tests for a retrieved abandoned cart where order_status is WCF_CART_ABANDONED_ORDER or WCF_CART_LOST_ORDER. An abandoned cart with an order_Status of ‘normal’ won’t be retrieved and thus $captured_data will be null, preventing the delete from ever being reached.
- The topic ‘Bug on change of order status’ is closed to new replies.