Get 6 months of FREE maintenance with our website redesign service!

How To Complete WooCommerce Order Automatically After Successful Payment

Share This Post

Code To Copy and pase as PHP sinppet:

add_action('woocommerce_thankyou','custom_woocommerce_auto_complete_order');
function   custom_woocommerce_auto_complete_order( $order_id ) {  
                if ( ! $order_id ) {return;}            
                $order = wc_get_order( $order_id );    
                $order->update_status( 'completed' ); 
}

Do You Want To Boost Your Business?

drop us a line and keep in touch

More To Explore