0

I am using woocommerce plugin to checkout orders using paypal method. But issue is that when payment is done then orders status should moved to processing but it is still showing pending. So how to do that. I want order status should move automatically to processing once payment is done using paypal.

Upendra Sharma
  • 575
  • 2
  • 9
  • 28
  • http://stackoverflow.com/questions/35686707/woocommerce-auto-complete-paid-virtual-orders-depending-on-payment-methods – LoicTheAztec May 10 '16 at 15:01
  • I think it will not move order status pending to processing once payment is done, it is still stuck to pending – Upendra Sharma May 11 '16 at 02:05
  • That is very strange…You can try this free plugin, it works mostly with paypal: [WooCommerce Autocomplete Orders](https://fr.wordpress.org/plugins/woocommerce-autocomplete-order/) – LoicTheAztec May 11 '16 at 02:15
  • Plugin is not working, this is not a solution – Upendra Sharma May 11 '16 at 03:08
  • So the problem could be coming from the settings of your payment method (in woocommerce or in paypal backend)… sorry for you… I can't do anymore. – LoicTheAztec May 11 '16 at 03:23

1 Answers1

0

Insert this below code in your function.php. This code change order status pending to processing once payment is completed.

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

function custom_update_order_status( $order_status, $order_id ) {

 return 'processing'; 

}
Purvik Dhorajiya
  • 4,662
  • 3
  • 34
  • 43