How to Automatically Complete Processing Orders in WooCommerce – 2026

Last updated on September 16th, 2024 at 09:11 am

For many WooCommerce store owners, manually changing order statuses from “Processing” to “Complete” can be a time-consuming task, especially when dealing with simple or virtual products that don’t require shipping. Automating this process can save time and ensure customers receive order updates more quickly. In this guide, we’ll show you how to automatically complete orders in WooCommerce once they reach the “Processing” stage, using a simple addition to your theme’s functions.php file.

Before implementing this customization, it’s advisable to use a child theme to avoid losing your changes when your main theme updates. You can create a child theme quickly using our free WordPress child theme generator.

Step 1: Add Custom Code to Automatically Complete Orders

You can automatically mark orders as “Complete” by adding a function to your theme’s functions.php file that hooks into the WooCommerce order status transition. This function will check if the order contains only downloadable or virtual products and, if so, will change the order status to “Complete.” Here’s how you can add this functionality:

/*
 * Snippet: How to Automatically Complete Processing Orders in WooCommerce – 2026
* Author: John Cook
* URL: https://wcsuccessacademy.com/?p=1476
* Tested with WooCommerce 10.7.0
* "Automatically mark orders as complete if they only contain downloadable or virtual products"
*/ function wc_success_auto_complete_order($order_id) { if (!$order_id) { return; } $order = wc_get_order($order_id); $items = $order->get_items(); foreach ($items as $item) { $product = $item->get_product(); if (!$product->is_virtual() && !$product->is_downloadable()) { return; // Don't complete the order automatically if any product is not virtual or downloadable } } // If all products are virtual or downloadable, mark the order as completed $order->update_status('completed'); } add_action('woocommerce_order_status_processing', 'wc_success_auto_complete_order');

This code snippet checks each product in an order when its status transitions to “Processing.” If all products are either virtual or downloadable (i.e., do not require shipping), the order status is automatically updated to “Complete.”

See also  How to Set Maximum Order Quantity Based on User Role in WooCommerce - 2026

Step 2: Testing Your Code

After implementing the code, it’s crucial to test it to ensure it behaves as expected. Create test orders with different combinations of products (virtual/downloadable and physical) to verify that the automation works correctly:

  1. Place an order with only downloadable or virtual products.
  2. Place another order that includes at least one physical product.

The first order should automatically switch to “Complete,” while the second should remain in “Processing” until manually updated, assuming other conditions like payment confirmation are met.

Conclusion

By automating the completion of certain orders, you streamline your operations, reduce administrative overhead, and improve customer satisfaction by providing faster updates. This approach is especially beneficial for stores that primarily sell virtual or downloadable products.

If you haven’t yet set up a child theme, using our free WordPress child theme generator can help you make these changes safely and easily.

See also  How to Add a Video to the WooCommerce Product Page Gallery Without a Plugin - 2026

Implementing this feature allows you to focus more on growing your business and less on routine administrative tasks, enhancing both efficiency and customer experience in your WooCommerce store.

5 1 vote
Article Rating

Stay In Touch

Was this post helpful? Why not show your support and buy me a coffee?

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Scroll to Top
0
Would love your thoughts, please comment.x
()
x
×