How to switch orders from ‘processing’ to ‘completed’ automatically WooCommerce?

Please, add this code snippet to the bottom of functions.php file of your theme. You can do this via WP Admin > Appearance menu > Theme Editor > and by picking “Theme Functions” (functions.php) on the right.