order status automatically changes from “complete” to “processing”
-
Got an issue where Woo orders which were marked “completed” by someone in the back end are automatically getting their status updated to “processing” later that day.
I did add a simple function earlier this year at the request of the person handling these orders, who asked me to prevent Woo from automatically changing order status to “completed.” They wanted that final step to be only done manually.
Is it possible that this function is no longer working right after one of the Woo Commerce updates? I don’t see how, but maybe I’m missing something. Here’s the function:
/*prevent any orders from autocompleting*/ add_action( 'woocommerce_thankyou', 'stop_auto_complete_order' ); function stop_auto_complete_order( $order_id ) { if ( ! $order_id ) { return; } $order = wc_get_order( $order_id ); $order->update_status( 'processing' ); }
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘order status automatically changes from “complete” to “processing”’ is closed to new replies.