If you are selling software or other downloadable / virtual products, there’s not really any need to have the order “processing”.
As soon as the customer checks out, the product is usually delivered.
Therefore, it makes sense for us to just automatically mark it as complete.
The below snippet will show you exactly how to do this.
Copy and paste the following code into your functions.php file.