Home » WooCommerce: Automatically Complete Processing Orders

WooCommerce: Automatically Complete Processing Orders

by Tutor Aspire

If you wish to mark paid orders as “Completed” automatically (i.e. without having to manually login to the site and “check” processing orders one by one), you can use the code below.

What is more, this snippet will completely skip the “Processing” order status transition, which means no “Order Processing” email notification will trigger either. Once again, these 4 lines of code could save you millions of hours… hope this helps!

A paid order (via Stripe) is not getting the “Processing” status any longer – instead, it’s going straight to “Completed”

PHP Snippet: Autocomplete WooCommerce Paid Orders

/**
 * @snippet       Programmatically Complete Paid WooCommerce Orders
 * @how-to        Get tutoraspire.com FREE
 * @author        Tutor Aspire
 * @testedwith    WooCommerce 3.8
 * @donate $9     https://www.tutoraspire.com
 */

add_filter( 'woocommerce_payment_complete_order_status', 'tutoraspire_autocomplete_processing_orders', 9999 );

function tutoraspire_autocomplete_processing_orders() {
   return 'completed';
}

You may also like