change the order status to completed after approve in the payment confirmation
-
I want to change the order status to completed after press the button approve in the payment confirmation
is it a code like this?
Put it on and it doesn’t work.
Or at what step did you make a mistake?add_filter( 'woocommerce_payment_complete_order_status', 'rfvc_update_order_status', 10, 2 ); function rfvc_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; }
1) Start as => on-hold status
2) When someone transfers money to => Checking payment
3) When approved in payment confirmation, the payment change => Processing.I want to press the button approve in the payment confirmation and chage to completed status
how can i do that
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘change the order status to completed after approve in the payment confirmation’ is closed to new replies.