• Resolved Megunticook

    (@megunticook)


    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' );
    }
    • This topic was modified 6 years, 1 month ago by Megunticook.
    • This topic was modified 6 years, 1 month ago by Megunticook.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    You can use something like this snippet to have all orders marked as processing, even those with virtual downloadable products that would traditionally mark as complete when paid. https://stackoverflow.com/questions/35686707/woocommerce-auto-complete-paid-orders-depending-on-payment-methods

    Hopefully that helps! Have a great one!

    Thread Starter Megunticook

    (@megunticook)

    Thanks–actually I already have a function in place to prevent virtual downloadable orders from autocompleting (see my post above).

    The issue is that sometimes orders that are manually completed are somehow reverting to “processing” status, and I’m wondering what might be causing this and whether it might somehow be my function preventing autocomplete.

    Hi
    I am experiencing similar issues with statusses being changed automatically
    Did you find a cause/solution?
    Thanks

    @megunticook Did you ever get to a resolution here? I’m having the exact same issue.

    Any insight would be appreciated.

    Thanks,
    Tony

    Thread Starter Megunticook

    (@megunticook)

    Well, I ended up removing that PHP snippet I referred to in the beginning and the problem disappeared.

    I am having the same problem. Would you mind explaining to me how I can fix it? Thank you

    misstest

    (@misstest)

    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’m having this issue too. How did you fixed it?

    tocco

    (@tomacco)

    same here…
    Any idea how to disable automatic change status to processing?

    Thread Starter Megunticook

    (@megunticook)

    I removed a custom PHP function that I had placed in functions.php, and that solved it.

    Hi all, I see that still there is no explanation here.

    The reason why orders are reverting their statuses to processing, may be that the code is added to thank you page.
    I see it very often.
    Thank you page for each order is available through link. Then if someone will load “Thank you” page for that order – the snippet will be called and status will be changed again…

    Conclusion: it is not good idea to change statuses on thank you page.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘order status automatically changes from “complete” to “processing”’ is closed to new replies.