Prevent auto complete non-cod payments on admin side

55
November 06, 2021, at 04:40 AM

Preventing on customer side is pretty easy:

function stop_auto_complete_order( $order_id ) { 
    if( !$order_id ) {
        return;
    }
    $order = wc_get_order( $order_id );
    $order->update_status( 'processing' );
}
add_action( 'woocommerce_thankyou', 'stop_auto_complete_order' );

but, once the order is completed one cannot update its status to processing (edit order page).

Auto complete order for non-cod payments Order status changed from Processing to Completed.

Where to hook the code to stop this crazy behavior?

READ ALSO
PHP: use declared variable with data from MySQL inside an included file [closed]

PHP: use declared variable with data from MySQL inside an included file [closed]

Want to improve this question? Add details and clarify the problem by editing this post

75
OPC UA Client(C#) with a GUI and a node js server

OPC UA Client(C#) with a GUI and a node js server

So I have created a nodejs Server from this tutorial: https://github

136
My Tflite model works perfectly in jupyter notebook. However shows me the wrong output when I try to run it in Android studio

My Tflite model works perfectly in jupyter notebook. However shows me the wrong output when I try to run it in Android studio

So I created my custom model for disease recognition based on the symptoms entered by the patientAnd it works perfectly on python, However after I converted it to tflite and ran it on android studio, It gives me wrong predictions irrespective of the input values

83