Upendra Sharma
Upendra Sharma

Reputation: 685

How to move order status to processing once payment has been done using paypal in woocommerce?

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.

Upvotes: 0

Views: 1291

Answers (1)

Purvik Dhorajiya
Purvik Dhorajiya

Reputation: 4870

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'; 

}

Upvotes: 0

Related Questions