Reputation: 121
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.
Upvotes: 0
Views: 2023
Reputation: 3614
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
Upvotes: 2