When you sell virtual and downloadable products sometimes you need some time after payment to grant the customer a download access. However, WooCommerce does set the orders with only virtual and downloadable products directly to “Completed” status after payment, which can break your order fulfillment flow. Thankfully WooCommerce is also quite versatile and offers filters to set the order in “Processing” status even if it contains only virtual and downloadable items. Here is how we do it
1. Use the code below and add it to your “theme\functions.php” file(at the bottom is fine).
2. Go to WooCommerce > Settings > Products > Downloadable Products > Uncheck the checkbox “Grant access to downloadable products after payment” > Save
This process will make sure that the orders are marked as “Processing” after they are completed by your gateway and that your customers have access to the downloads only when the order is marked “Completed”
If you have any questions, please write them in the comments.