Downloadable item orders are stuck on 'processing' when the payment is completed
Closed this issue · 2 comments
Hey folks,
I have an issue with orders with downloadable items. I'm currently using the latest Wordpress, WooCommerce and EBANX Gateway versions.
I've narrowed the issue down to this function call:
Since you're manually changing the order status, and WC_Order::payment_complete was not used, the necessary actions are not being called, which results in the kind of issue I'm experiencing. This is easily fixed by adding a call to WC_Order::payment_complete.
Official method reference:
https://github.com/woocommerce/woocommerce/blob/master/includes/class-wc-order.php#L87-L99
Thanks!
Hey there,
The payment is completed, but the order is still being processed by the merchant. Therefore, the customer should see the order status as "processing" and not "completed" at this point.
Thanks for the response.
It's naive to assume that the next order status after the payment is "processing". For digital orders, by default, it's not (the old plugin, for example, did work as expected). This behavior also breaks custom order statuses, such as the ones set by WooCommerce Order Status Manager, which is an official plugin and depends on the actions/filters called by payment_complete().