Woocommerce stuck on Processing order with Worldpay
This has come up a couple of times recently – Orders are stuck on Processing when the moeny has been taken and the client returned to the website to see order BUT no confirmation emails have been sent.
The order is still set to Processing. Because: if it is not BOTH Virtual and Downloadable then woocommerce is waiting for YOU to send the product and therefore Complete the order – when you manually set order to complete.
But thats a bit rubbish – what happens if you seel a course tciket that is not downloadable but is virtual ? or something else?
then…. either set the product to Downloadbale – btu then you get download problems
OR add this code to your Child teheme function file:
/** Auto Complete all WooCommerce orders. */
add_action( ‘woocommerce_thankyou’, ‘myautocomplete_woocommerce_auto_complete_order’ );
function myautocomplete_woocommerce_auto_complete_order( $order_id ) {
if ( ! $order_id ) {
return;
}
$order = wc_get_order( $order_id );
$order->update_status( ‘completed’ );
}
Thanks to this for sorting me out: https://sanjeebaryal.com.np/why-is-my-woocommerce-order-status-always-processing/
