Home > WooCommerce > Docs > How to Change Order Status in WooCommerce

How to Change Order Status in WooCommerce

Last updated: April 01, 2024
This article has been written and researched by our expert Avada through a precise methodology. Learn more about our methodology

Sam

Author

Daniel

Researcher

The customer experience has moved to the forefront of eCommerce. Furthermore, customer expectations are continually growing as merchants of all sizes compete with industry behemoths. Though it is easy to ignore, order management dependability and consistency have a big role in the whole experience. One of the practices to help your WooCommerce stores meet your customers’ expectations is to let them know about the Order Status, which assists in reducing the “risk” of purchasing products online and developing confidence with your consumers.

That being said, in this blog, we’ll take you through instructions on How to Change Order Status in WooCommerce as well as our recommendations on 4 Best Order Status Plugins for WooCommerce.

Let’s dive in!

Why is Order Status important?

Before knowing how to Change the WooCommerce order status, you may need to know about the benefits you can get from updating Order Status on your WooCommerce stores. These will help you either understand the advantages of order status or know what to do to make the most out of updating order status for you and your customers.

Below are the 3 most noticeable benefits that are seen from the seller’s and shoppers’ point of view, which means Order Status not only helps you in some ways but also does your customers good.

  • Reduce expenditure on customer service to respond to queries related to the orders: Order Status really helps resolve a lot of customers’ queries as it takes up the main part of their concerns when ordering things online. Who doesn’t care about where their parcel has been? Therefore, if there’s no Order Status in the order details section that customers can check regularly, you may need to get your WooCommerce prepared for a storm of questions and complaints from the customers about the orders. In this case, your customer service team should contain more staff to be in charge.

  • Provide your customers with assurance and satisfaction: This advantage is closely linked to the previous one. It goes without saying that being able to check the Order Status any time they like can keep customers secured and have peace of mind.

  • Keep both you and your customers informed about the order status to take timely actions when problems arise: Unlike direct purchase at physical stores, orders made through eCommerce platforms like WooCommerce are in greater danger of facing problems such as broken, lost or refused. In these cases, letting both your crew and your customers know about such issues is of utmost importance so that both sides can take measures to solve it as well as discuss the solutions if necessary.

How to Change Order Status in WooCommerce

Now as you know about the benefits of using Order Status as an indispensable part of the ordering process from your customers making the purchase to them receiving their orders, you may wonder how to change Order Status automatically as well as create custom status suitable for your WooCommerce Store.

Below is the 5 ways to Change Order Status in WooCommerce that you can choose from according to your needs. All of them utilize pieces of code, but don’t worry if you don’t have profound knowledge about programming or coding. The snippets are already written, and all you have to do is to copy and paste them in the right place.

1. Shift Order Status right after purchase

In case your eCommerce store isn’t associated with a payment method that utilizes order status, you may place all orders on hold immediately when the user places an order, rather than leaving it as “Processing”. Take a look at this script:


function   QuadLayers_change_order_status( $order_id ) {  
                if ( ! $order_id ) {return;}            
                $order = wc_get_order( $order_id );
                if( 'processing'== $order->get_status() ) {
                    $order->update_status( 'wc-on-hold' );
                }
}
add_action('woocommerce_thankyou','QuadLayers_change_order_status');

We utilize the woocommerce_thankyou hook to execute our function immediately after an order is placed, and update_status () to adjust the status.

The status slug, as you can see, has a prefix (WC). Even if the function functions without the prefix, it is preferable to use it.

Shift Order Status right after purchase

It’s worth mentioning that by modifying the code, you may use any other status, even bespoke ones, instead of “On hold”.

2. Change status from order ID

The script below will modify the status of a single order. To modify the order status of order 115, for example, we use the following snippet:


add_action('init',function(){
	$order = new WC_Order(115);
        $order->update_status('wc-processing'); 
});

Because this is a little script, we utilized an anonymous function in the 'init'WordPress hook.

It’s worth noting that while the script is active, you won’t be able to make any more changes to the status.

3. Update order status

This is another fascinating example of changing order status in WooCommerce automatically. The script below will only update the order status to “Completed” if the user has a previous order with the “Completed” or “Processing” status connected.


function QuadLayers_order_status_returning( $order_id ) {
        // Get this customer orders
         $user_id = wp_get_current_user();
        $customer_orders = [];
        foreach ( wc_get_is_paid_statuses() as $paid_status ) {
            $customer_orders += wc_get_orders( [
                'type'        => 'shop_order',
                'limit'       => - 1,
                'customer_id' => $user_id->ID,
                'status'      => $paid_status,
            ] );
        }
            # previous order exists
            if(count($customer_orders)>0){ 
                     if ( ! $order_id ) {return;}            
                     $order = wc_get_order( $order_id );
                     if( 'processing'== $order->get_status() ) {
                         $order->update_status( 'wc-completed' );
                     }
            }
}
add_action( 'woocommerce_thankyou', 'QuadLayers_order_status_returning' );

This might be an excellent idea to provide a layer of protection and improve the purchasing experience for returning customers.

4. Change order status on a URL

When the URL argument is present in the browser, this sample script will change to a specified order status. The script will function on any page of the shop because we are utilizing the init WordPress hook.

It will also change the order status for the currently logged-in user’s most recent order. In this case, the order status will be changed to “Cancelled” if any URL has the “revert” option, such as this: https://website.com/shop?st=revert


add_action('init',function(){
    if(isset($_GET['st'])&&!empty($_GET['st']) ):
        $get_url = $_GET['st'];
 
        if($get_url=='revert'):
            $user_id = wp_get_current_user();
            $order = wc_get_customer_last_order($user_id->ID);  
            $order->update_status( 'wc-cancelled' );
        endif;
    endif;
});

5. Customize order status

Instead of modifying an order’s status, we’ll establish a new custom order status that we may use at any time in this example. This is a fantastic option if the current statuses are insufficient or if you desire to establish a new one for greater clarity. Once you’ve created a custom order status, you may use it with any of the scripts listed above.

The script that follows will register and add a new status to the order status list. We’ll call the new custom order status “In process” in this example, but you can use whatever name you wish by just changing the code.


// Register new status
function register_in_progress_order_status() {
    register_post_status( 'wc-in-progress', array(
        'label'                     => 'In progress',
        'public'                    => true,
        'show_in_admin_status_list' => true,
        'show_in_admin_all_list'    => true,
        'exclude_from_search'       => false,
        'label_count'               => _n_noop( 'In progress (%s)', 'In progress (%s)' )
    ) );
}
// Add custom status to order status list
function add_in_progress_to_order_statuses( $order_statuses ) {
    $new_order_statuses = array();
    foreach ( $order_statuses as $key => $status ) {
        $new_order_statuses[ $key ] = $status;
        if ( 'wc-processing' === $key ) {
            $new_order_statuses['wc-in-progress'] = 'In progress';
        }
    }
    return $new_order_statuses;
}
add_action( 'init', 'register_in_progress_order_status' );
add_filter( 'wc_order_statuses', 'add_in_progress_to_order_statuses' );

This is the result.

Customize order status

4 Best Order Status Plugins for WooCommerce

With the aforementioned solutions, you may find the one that you need. However, if you haven’t found a suitable solution yet or just find it too complicated to use, you may need a third-party plugin to simplify the process.

Below are the 4 Best Order Status Plugins for WooCommerce which WooCommerce store owners widely use. In this section, we’ll provide you with all the necessary information about those add-ons that you may need to make up your mind about the most suitable Order Status Plugin for your WooCommerce store.

Let’s check out!

1. WooCommerce Order Status Manager

You may change the existing order statuses supplied by WooCommerce using this WooCommerce Order Status Manager. You may also add or delete additional order statuses to manage and customize your process based on your business needs. The new order statuses may also be used as triggers for email alerts sent to customers and administrators to keep them up to date on the progress of their orders.

WooCommerce Order Status Manager

KEY FEATURES

  • You may add new order statuses and describe them on the “view order” page.
  • To control the process, you may rearrange the order statuses in the admin account using drag and drop.
  • Customize the email template that will be sent when the order status trigger is selected.
  • Some order statuses can also be marked as paid in order to provide downloaded links and items.

PRICE

You can get WooCommerce Order Status Manager with a price of $49, which is bundled with 1-year extension updates, 1-year support and 30-day money-back guarantee.

2. YITH WooCommerce Custom Order Status

You may create an infinite number of custom statuses and choose how they are applied with the YITH WooCommerce Custom Order Status plugin. Furthermore, the plugin enhances your order page by making it more informative and user-friendly. You will also be able to change the order statuses that WooCommerce uses by default. The plugin also allows you to add labels and symbols to different order statuses to make them simpler to identify. It will surely improve the operational efficiency and customer experience of your WooCommerce store.

YITH WooCommerce Custom Order Status

KEY FEATURES

  • It allows you to create an infinite number of custom order statuses and distinguish them with labels, icons, or unique colors.
  • It gives you the ability to select the activities that will take place if an order switches to a custom state.
  • You can select from a variety of activities such as Pay, Cancel, Download, and so on.
  • It is compatible with the YITH Order Tracking plugin as well as a number of others.

PRICE

YITH WooCommerce Custom Order Status costs you € 79,99/ year with 1 year of updates and support as well as a 30-day money back guarantee.

3. Custom Order Status for WooCommerce

Custom Order Status for WooCommerce is another popular option for customizing the order status system in your WooCommerce business. You will be able to build custom order statuses and send them out as trigger emails. Furthermore, you may define specific order statuses based on the payment method chosen by the consumer. Custom statuses will now appear in the Actions column on your WooCommerce Orders page. The plugin is simple to set up and use.

Custom Order Status for WooCommerce

KEY FEATURES

  • It allows you to make your own order statuses and apply unique symbols to them.
  • You can send custom order emails when the status of a custom order changes.
  • You can use custom statuses in accordance with the payment gateway of choice.
  • Custom statuses can be added to admin reports, order actions, and bulk actions.
  • Custom statuses can be edited.

PRICE

You can choose from the following pricing plans to get Custom Order Status for WooCommerce:

  • Single Store – $39
  • Five Stores – $99
  • Unlimited Stores – $149

4. WooCommerce Order Status Control

You can utilize WooCommerce Order Status Control to manage how your orders are awarded the ‘Completed’ status. WooCommerce sets the order state to ‘Completed’ by default exclusively for downloaded goods after purchasing. This plugin may be useful in automatically fulfilling paid orders on your site or preventing downloaded goods from changing status automatically. Furthermore, you may use this plugin to finish numerous orders when no specific step is required in your fulfillment flow after the buyer finishes the payment. You may automatically complete orders in your WooCommerce store, independent of the product categories contained in the order.

WooCommerce Order Status Control

KEY FEATURES

  • It gives you control over when paid orders on your WooCommerce site are automatically processed.
  • It allows you to prevent purchases, including virtual or downloaded items, from being automatically completed.
  • It can automatically fulfill orders just when particular product types are included in the order, or for all orders.

PRICE

You can get WooCommerce Order Status Control with a price of only $29, which is bundled with 1-year extension updates, 1-year support and a 30-day money-back guarantee.

Conclusion

Though it’s a small detail, Order Status claims its importance in satisfying your customers and saving your resources effectively. To optimize its benefits, you should know How to Change Order Status in WooCommerce.

We hope that these instructions and advice will help you be more successful in making your customers happy and keep returning to your WooCommerce store.


Sam Nguyen is the CEO and founder of Avada Commerce, an e-commerce solution provider headquartered in Singapore. He is an expert on the Shopify e-commerce platform for online stores and retail point-of-sale systems. Sam loves talking about e-commerce and he aims to help over a million online businesses grow and thrive.

Stay in the know

Get special offers on the latest news from AVADA.