How to disable automatically set order status to 'Progressing' on Free Orders (Woocommerce)

1.8k Views Asked by At

Iam making a simple e-commerce website using WooCommerce plugin on Wordpress. I am using BAC as my payment gateway and i have a Non-price (Free product) and have-price products.

When user is ordering 'Free Product' from my store WooCommerce automatically change order status from 'pending' to 'progressing' (Because product have no price :), but I dont want to change status to 'progressing' just want to woocommerce keep 'pending' status until i approve order.

How can i do that? Thank you so much for helping.

The function should be for Non-price products. Should not affect have-pricing products.

Thanks.

1

There are 1 best solutions below

2
On BEST ANSWER

you can use below hook for change order status from process to pending again:

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

Check Link: woocommerce payment complete order status