I am having strange issue and this happens sometimes, when user pay for a course via paypal the order status changed from pending to processing instead of completed.

In this image IPIN notification received but still order is in processing stage, what could causing this issue. I tried to replicate this issue but it does not replicated at my end, It happens sometimes.

enter image description here

Here is product info:

  1. Product is virtual product
  2. Stock is disabled

enter image description here

closed as off-topic by Krzysiek Dróżdż, Jacob Peattie, rudtek, fuxia Dec 12 at 8:57

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

This is correct unless your product is a virtual product and it will auto complete in the latest woocommerce

Pending payment – Order received, no payment initiated. Awaiting payment (unpaid).

Failed – Payment failed or was declined (unpaid). Note that this status may not show immediately and instead show as Pending until verified (e.g., PayPal).

Processing – Payment received (paid) and stock has been reduced; order is awaiting fulfillment. All product orders require processing, except those that only contain products which are both Virtual and Downloadable.

Completed – Order fulfilled and complete – requires no further action. On-Hold – Awaiting payment – stock is reduced, but you need to confirm payment.

Cancelled – Cancelled by an admin or the customer – stock is increased, no further action required.

Refunded – Refunded by an admin – no further action required.

read more here https://docs.woocommerce.com/document/managing-orders/

Check the products and make sure they are virtual

UPDATE i take it your woocommerce is up-to date?

this is not a perfect fix but it will auto complete the orders and take to complete forcing paid orders to complete

i take it your woocommerce is upto date? if so this function will check for paid orders and force them to complete, as per usual add to your functions.php, its a strange error due to the randomness of it but using this function may hekp you in the intrim

add_filter( 'woocommerce_payment_complete_order_status', 'bhs1_update_order_status', 10, 2 );

function bhs1_update_order_status( $order_status, $order_id ) {

 $order = new WC_Order( $order_id );

 if ( 'processing' == $order_status && ( 'on-hold' == $order->status || 'pending' == $order->status || 'failed' == $order->status ) ) {

 return 'completed';


 return $order_status;
  • product is virtual and stock management is not enabled at product level. Do you suggest anything ? – Hemant Kumar Dec 5 at 11:08
  • is this happening to random orders against all products? or specific products only – Brad Holmes Dec 5 at 11:10
  • it's happening to random orders against all products. – Hemant Kumar Dec 5 at 11:31
  • try the filter i have updated in my answer this will force your orders to complete – Brad Holmes Dec 5 at 12:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.