Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'woocommerce_thankyou', 'woocommerce_auto_processing_orders');
- function woocommerce_auto_processing_orders( $order_id ) {
- if ( ! $order_id )
- return;
- $order = wc_get_order( $order_id );
- // If order is "on-hold" update status to "processing"
- if( $order->has_status( 'on-hold' ) ) {
- $order->update_status( 'processing' );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement