Description
Issue
We have seen an intermittent issue with some failed payment orders begin set as "complete". As the "complete" status assumes the order is fully paid and shipping/ready to be shipped this status change is incorrect.
Example
In this particular instance the order was created via a cart recovery email. Mollie seemed to think this order was already cancelled and was unable to process it further. It then set the status from Trash > Complete but no payment has been taken.
I can see the hook (woocommerce_order_status_completed) in PaymentModule.php that is producing the notice in the order comments (attached) but this looks like the order has already been set to "complete". I am wondering if when the "updateOrderStatus" function runs, there is an exception which isn't being found and Woo is setting the order status as "complete".
Log
2023-08-01T11:19:47+00:00 DEBUG Mollie\WooCommerce\Payment\PaymentModule::shipAndCaptureOrderAtMollie - 12425 - Try to process completed order for a potential capture at Mollie.
2023-08-01T11:19:47+00:00 DEBUG Mollie\WooCommerce\Payment\PaymentModule::shipAndCaptureOrderAtMollie - 12425 - Order already canceled at Mollie, can not be shipped/captured.