how to change default order status in woocommerce

How to Change Default Order Status in WooCommerce

As of 2022, 2.14 out of 7.87 billion people on earth shop online.

Great stat for online store owners, right?

But the competition is no less than a jungle where only the fittest will survive.

Therefore, as a WooCommerce store owner, you must be organized and not leave any piece unattended.

WooCommerce order status helps you understand in what stage the order is in and proceed to the next steps or help resolve issues related to them.

Moreover, you can change WooCommerce default order status to better organize and manage your store.

In this article, we will talk about how to change the default order status in WooCommerce manually by adding codes and with plugins.

Before that, let’s talk about what is WooCommerce order status.

What is WooCommerce order status?

When a customer places an order, means when they click the Place Order button filling in all the needed information, WooCommerce creates an order in the backend. You can find them on WooCommerce>>Orders page.

default order status

As you can see, the Status section is showing the current state of the orders. These are WooCommerce default order statuses.

WooCommerce default status is a tag that every order has that shows the current state of the order. For example, when a customer clicks on the Place Order button, the order status is set to “Pending Payment” by default.

If you have payment gateways integrated into your WooCommerce store, then WooCommerce will change the previous WooCommerce default order status to ‘On Hold’ automatically if the customer has made the payment.

If the payment validation is successful, then the order status will be changed to ‘Processing’ status automatically. However, if the payment fails for some reason, then the WooCommerce default order status for that order will change to ‘Failed.’

Therefore, these order statuses let you know relevant information about the order and when to start the order fulfillment process.

List of WooCommerce default order status

Let’s have a quick look at the default order statuses WooCommerce displays.

Pending payment: This means the customer has placed an order but hasn’t made the payment yet.

On hold: The customer has used a payment gateway you offer in your WooCommerce store and made the payment. But the payment gateway or your store hasn’t confirmed or validated the payment yet.

Failed: This WooCommerce default order status means the payment the customer made has failed. Generally, this occurs when your payment gateway provider (Stripe, Paypal) rejects the payment for some reason or asks for further authentication.

Processing: When the payment is validated, means when your payment provider or store manager confirms the payment has been received, WooCommerce displays the ‘Processing’ status. WooCommerce also automatically updates the stock count, and this status indicates you need to start the shipment process.

Completed: This is the final phase of an order in which everything was completed successfully.

Canceled: The order has been canceled at some point, either by the user or by you/a shop admin. There is no need to take any additional action at this time; however, it is recommended that you get in touch with the customer to inquire about the reason they canceled the order.

Refunded: This means the order has been canceled and you have refunded the total amount the customer paid.

The WooCommerce default order status seems enough to let you know the current state of the orders, right?

Then why would you need to change the default order status?

That’s what we’ll find out next.

Why change default order status WooCommerce?

There’s almost no limit to the categories of online shops you can create and run with WooCommerce.

Depending on the type of shop you are running or the products/services you are selling, you may need to create some WooCommerce custom order status or disable some default ones.

For instance, if your product or service is not returnable and refundable, then you won’t need the Refund order status.

If you are accepting payments in a bank account, your default order status will be ‘On Hold.’ You can’t really tell if it is on hold because of the payment processor or if the customer has used the bank account payment method.

You will have to get inside the order detail pages one by one to learn which one needs bank payment confirmation which will be excessively time-consuming. A custom order status, for example, ‘Bank payment,’ would save your precious time and effort here.

The WooCommerce default order status ‘Processing’ can create several types of confusion.

For example, if you accept ‘Cash on Delivery’ immediately after your customer places an order using that method, the default order status will be ‘Processing.’ Also, when a customer successfully pays using a payment method, it will also show ‘Processing.’

Moreover, you don’t know if you or your team has forwarded the order to the shipping department or if you have shipped the order already or not.

Also, when you sell virtual downloadable products, there’s no order fulfillment or shipment process. Customers will get the product as soon as the payment gateway validates the payment.

Therefore, if you create individual custom order statuses for these situations and automate some existing default order statuses, your store management will be a lot more organized and more straightforward.

For example, you can create custom order statuses like – Cash on Delivery, In progress, Shipped, etc., or automate ‘Completed’ order status creation when selling downloadable products.

The great news is that you don’t necessarily need to change the custom order status manually. You can also automate this process like the WooCommerce default order statuses.

But first, we need to understand how WooCommerce generates and changes default order status.

How WooCommerce default order status works

When you install payment gateway providers such as Stripe, PayPal, etc., in your store, WooCommerce changes the order status automatically depending on the validation of the payments.

Let’s have a look at how WooCommerce order status flow works.

woocommerce-order-process-diagram

Source: WooCommerce Official Documentation

As we have mentioned earlier, the first stage is ‘Pending.’ When the customer selects the bank account payment method, WooCommerce changes the default order status to ‘On Hold.’ When you receive the payment in the bank, you or your WooCommerce store manager can change the status to ‘Processing.’

Or when the customer pays using Stripe/PayPal etc., that payment gateway automatically changes the status to ‘On Hold.’ When the payment is validated, the status will automatically change to ‘Processing’; otherwise, it will show ‘Failed.’

Up to this point, the order status creation was mostly automated. But after this, you need to manually set either ‘Complete,’ ‘Canceled,’ or ‘Refunded.’

Can you also automate these last 3 order status creations? Or automatically jump to ‘Complete’ status when selling downloadable products?

Yes, you can. You can also create new custom order statuses as well as replace the existing ones.

How to change default order status in WooCommerce?

In this section, we will learn how to change order status in WooCommerce with or without plugins, create new WooCommerce custom order statuses and assign them for different situations.

First, we will try changing the WooCommerce default order status by adding some codes. Don’t worry if you are not a developer or have no coding skills. We will show you, step by step, exactly how to do it.

Changing WooCommerce default order status with code

We will be adding different codes to the function.php file of your WordPress theme. You can either access it from your hosting file server or your WordPress admin panel.

We will use the WordPress admin panel. 

Go to Appearance>> Theme File Editor and click on the function.php.

functionphp

Here we can add our PHP code snippets.

Automatically set ‘Completed’ order status after payment

If you are only selling downloadable virtual products, then you don’t need the ‘Processing’ order status as there are no shipments involved. You can directly set it to ‘Completed’ after successful payment and we also want WooCommerce to set it automatically.

WooCommerce initiates the woocommerce_payment_complete hook after successful payment. You can use this hook to automatically change WooCommerce default order status to ‘Completed.’

To do that, paste the following code to your function.php file you opened earlier.

add_action( ‘woocommerce_payment_complete’, ‘webappick_set_completed_for_paid_orders’ );

function webappick_set_completed_for_paid_orders( $order_id ) {

$order = wc_get_order( $order_id );

$order->update_status( ‘completed’ );

}

Scroll down to the bottom of the function.php page and paste in a new line, and update.

completed directly

Now when a new customer places an order, and the payment gateway successfully receives the payment, WooCommerce will automatically set default order status to ‘Completed.’

completed

Create a WooCommerce custom order status

We want to create a completely new order status and want it to appear in the order status list on the order page.

For this example, we want to create a custom order status for cash on delivery payment method. Paste the following code in your function.php file.

// Register new status

function register_in_cash_order_status() {

register_post_status( ‘wc-in-cash’, array(

     ‘label’                 => ‘Cash on Delivery’,

     ‘public’                => true,

     ‘show_in_admin_status_list’ => true,

     ‘show_in_admin_all_list’ => true,

     ‘exclude_from_search’   => false,

     ‘label_count’           => nnoop( ‘Cash on Delivery (%s)’, ‘Cash on Delivery (%s)’ )

) );

}

// Add custom status to order status list

function add_in_cash_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-cash’] = ‘Cash on Delivery’;

     }

}

return $new_order_statuses;

}

add_action( ‘init’, ‘register_in_cash_order_status’ );

add_filter( ‘wc_order_statuses’, ‘add_in_cash_to_order_statuses’ );

Now go to any order page, click the Status dropdown, and you will find your new WooCommerce custom order status.

status dropdown

Obviously, you can create a custom order status with any other name for different purposes.

Replace a WooCommerce default order status

We have two payment methods in our demo WooCommerce store, direct bank transfer and cash on delivery.

When a customer chooses to pay through bank transfer, WooCommerce sets the order status to ‘On Hold.’ This is perfect because you will want to first confirm with the bank if the customer has sent the payment or not.

However, for the cash-on-delivery option, WooCommerce set the order status directly to ‘Processing.’ This can create confusion as we discussed earlier.

Therefore, instead of WooCommerce order processing, we want to assign the ‘Cash on Delivery order status.

To do so, you need to change the ‘Processing’ order status to ‘Cash on delivery.’

add_action( ‘woocommerce_thankyou’, ‘woocommerce_thankyou_change_order_status’, 10, 1 );

function woocommerce_thankyou_change_order_status( $order_id ){

if( ! $order_id ) return;

$order = wc_get_order( $order_id );

if( $order->get_status() == ‘processing’ )

     $order->update_status( ‘wc-in-cash’ );

}

Now when a customer selects the Cash on Delivery payment method, WooCommerce will set ‘Cash on Delivery’ order status instead of ‘Processing.’

cash on delivery

You can replace any other WooCommerce default order status with each other as per your need. For example, you can create an ‘In Progress’ custom order status and replace it with ‘Processing.’

Set one WooCommerce order status for all checkouts

Let’s say, we want to set all order status to ‘On Hold’ after customers place an order.

add_action( ‘woocommerce_thankyou’, ‘webappick_thankyou_change_order_status’ );

function webappick_thankyou_change_order_status( $order_id ){

   if( ! $order_id ) return;

   $order = wc_get_order( $order_id );

   $order->update_status( ‘wc-on-hold’ );

}

No matter what payment method the customer chooses, the WooCommerce default order status will be ‘On Hold.’

For example, the customer selected the cash on delivery payment method which should generate the ‘Processing’ order status, but it’s now set to ‘On Hold’ WooCommerce default order status.

on hold

Change WooCommerce default order status for returning members

Suppose you have a subscription-based membership website, and the members pay you on a monthly or yearly basis.

And you want to change your members’ order status directly to ‘Completed’ after successful payment only if they have previously completed or under processing orders.

To achieve that, paste the following code –

function Webappick_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’, ‘Webappick_order_status_returning’ );

So we have learned how to create a new WooCommerce custom order status, replace one status with another, set specific order status for all types of orders, and how to assign a ‘Completed’ status after successful payment automatically.

Is that enough? Do you need to learn coding to add more functions?

Is it safe to directly add codes to your theme file?

Well, there are a lot more changes you can make to your WooCommerce default order status without any coding experience. Adding codes can always be uncomfortable for some and not a recommended method for amateurs unless they are very cautious.

You can use plugins to further change WooCommerce order status or create new ones according to your needs within no time.

Using a plugin to change WooCommerce default order status

For this article, we will be using the Custom Order Status for WooCommerce by Tyche Softwares. You can take your order status customization to a whole new level using this plugin.

After you install the plugin, go to WooCommerce >> Settings, and you will notice a dedicated tab called “Custom Order Status.” Click on the tab.

custom order status

First, we need to create some custom WooCommerce order status.

Create custom order status

Click on the pointed link to go to the custom order status list page.

custom order status tool

Click on the Add new button and it will take you to the ‘Add New Custom Order Status’ page.

bank payment

First, give your custom order status a name. In our case, we are putting ‘Bank payment.’ Then write the slug for it as you can see in the image.

It is recommended to use a ‘wc’ prefix before the order status slug. Input your slug without the prefix in the second slug field. You can also assign icons for individual order statuses. Find all the icon codes here.

You can also change the icon and text color.

If you are creating a WooCommerce custom order status for successfully paid orders, then you can select the first option.

bank payment 2

Generally, WooCommerce default order status after successful payment is ‘Processing,’ but you can replace that now.

You can also allow your customers to cancel the order when this order status is applied.

Custom notification email
email settings

This is a unique feature of this plugin. You can enable, customize and send an email to your customers or your admins when the order status is changed to this status.

For example, suppose you have a separate inventory department. In that case, you can create a custom order status for them and create a customized email for them to notify them automatically that they need to start the shipping process.

The plugin has a number of shortcodes you can use to personalize the email.

You can choose whether to increase or decrease the product stock count as per the products selected in the order when the order status changes to this custom status.

stock

Additionally, you can also send custom SMS when the default order status changes to this custom order status.

Once you are done, click the publish button, and your new WooCommerce custom order status will be listed on the order status list page.

custom order list

Set custom order status for different payment gateways

Jump back to the custom order status tab and click on the Set order status for payment gateways link. From there, you can set custom order status for different payment gateways.

payment gateways

As a result, when a customer places an order, you can immediately know what payment method they have used without even getting inside the order detail page.

Also, you can easily recognize which orders are already paid and which you need to verify and confirm manually.

For example, if the customer has chosen bank transfer, you will know that you need to confirm with the bank first. When you see order status ‘Stripe,’ you can be assured the payment was successful, and now you can proceed to order fulfillment.

Make sure you enable the option ‘Make custom status orders paid’ in the custom order status creation page for order statuses like the ‘Stripe.’

Now let’s go to the order list page and see how it looks.

order list

There you go, your personalized custom order statuses. The individual color and icons will help you identify the statuses quickly. Also, you can change WooCommerce order status within a single from the ‘Action’ column icons you can see in the right corner.

You don’t need to visit the individual order detail page to change your order status and this will save you ample time.

You can create different custom order statuses for every step and notify your customers about the progress via email or SMS.

Additionally, you can also attach your current order status information to your invoice or packing slips. You can do this by installing a pdf invoicing plugin called Challan. The plugin automatically generates and attaches a personalized invoice to your order confirmation email.

Best plugins for changing WooCommerce order status

If you have been using WooCommerce or at least know about WooCommerce, you already know that for every problem, there’s a plugin!

Yes, there are a number of plugins available for changing WooCommerce default order status. We have reviewed the best ones below.

Custom Order Status for WooCommerce By Tyche Softwares

tyche soft custom order

This plugin also has a free version available in the WordPress plugin repository, which has 20k+ active users. That makes this plugin one of the, if not the best freemium plugin for changing WooCommerce default order status.

Custom Order Status for WooCommerce By Tyche Softwares also allows your customers to check order status from their ‘My Account page, which is a great feature to enhance the customer experience.

As we have demonstrated, this plugin lets you create as many custom statuses as you want for different scenarios. And for every custom order status, it allows you to create separate custom notification emails you can send to your customers or department admins.

You can select different icons and colors for your new custom order statuses and change individual WooCommerce order statuses without entering into the order detail page.

You can also select multiple orders to change to a custom order status.

We have already shown you that this plugin lets you assign different WooCommerce order status for different payment gateways.

Key features

  • Create as many custom order statuses as you want.
  • Assign different icons and colors to the custom order statuses.
  • Create and assign customized emails for individual custom order statuses.
  • Quick order status change via action icons.
  • Change order status in bulk.
  • Set custom statuses as WooCommerce default order status based on payment method.
  • Allows users to cancel orders based on assigned custom order status.

Price

The premium version costs $59 per year.

WooCommerce Order Status Manager by SkyVerge

skyverge

WooCommerce Order Status Manager by SkyVerge plugin is available in the official WooCommerce marketplace.

With this plugin, you can create completely new custom order statuses and then integrate those statuses into your order management flow in a seamless manner.

It also allows you to edit WooCommerce default order status or even delete existing ones.

Just like other plugins, this plugin allows you to create custom order statuses with customized colors and icons. You can quickly change the order status from the ‘Action’ column on the order list page.

In addition to that, the plugin also allows you to bulk change order statuses.

Key features

  • Create custom order statuses with personalized colors and icons.
  • Edit WooCommerce default order status.
  • Create a streamlined workflow for order fulfillment with the help of “Next Statuses” and add order action buttons.
  • Bulk change WooCommerce order status from the order list.
  • Customers will be able to see “Pay” and “Cancel” links on your website if you set the order status to “requires payment.”

Price

The plugin costs $49.00 per year.

WooCommerce Order Tracker

order trackers plugin

WooCommerce Order Tracker is an awesome plugin that combines both custom order status and order tracking.

You can create as many custom order statuses with icons and colors as you need and let your customers know the current state of their orders.

For example, you can create separate custom order statuses for Packing, Dispatched, Shipping, etc., and your customers will know easily how far their products are.

Moreover, the plugin also integrates with all the popular shipping providers. There is an option called “enhanced tracking” that can be used with many of these different companies. However, API integration with USPS, FedEx, and Canada Post is even more comprehensive.

When you integrate with the shipping providers, you will be able to show your customers highly detailed and accurate information about the progress of their orders. Also, thanks to the order tracking feature of the plugin, your customers will be able to track orders from their ‘My Account’ dashboard.

Key features

  • Very affordable plugin compared to others.
  • Allows you to create custom order status and upload preferred logos.
  • Provides order tracking feature.
  • Allows you to create and send custom notification emails on order status changes.
  • Displays order tracking information with an estimated delivery date.
  • Integration with FedEx, Canada Post, and USPS is possible. Third-party shipment tracking can also be enabled by the administrator.
  • Support bulk change of custom order statuses.
  • Lets your customer know the current state of their order from their dashboard.

Price

It costs only $29.

Frequently Asked Questions (FAQs)

How do I add more order status in WooCommerce?

You can add more custom order status by adding PHP code snippets in your function.php file. However, the quickest and best way to do it is by installing a third-party plugin such as Custom Order Status for WooCommerce By Tyche Softwares.

What is the best plugin for creating custom order status?

There are a number of free and paid plugins available for creating WooCommerce custom order status. Some of the notable names are Custom Order Status for WooCommerce By Tyche Softwares, WooCommerce Custom Order Status, WooCommerce Order Tracker, etc.

How do I AutoComplete WooCommerce orders?

You can add a code snippet to your WordPress theme’s function.php file, or you can use a plugin to auto-complete WooCommerce orders of your choice.

Wrap up

You can create WooCommerce custom order statuses and decide what action should be taken next, either automatically or manually, with the help of any of the plugins we mentioned in this article.

Overall, creating custom order statuses will give you clear insights into the state of your orders. You can learn what stage an order is in, what action is needed, and also, your customer will know the progress of the orders they made.

This will improve your store management and grow your efficiency and reputation.

Hope this article on how to change default order status in WooCommerce will help you understand the concept and help you create your own custom order statuses.

You May Also Read

4 thoughts
  1. I cannot get these codes to work. Every attempt results in a fatal error to my site blocking the backend until I replace the file. I’ve tried the Cash on Delivery custom status, the default On Hold, and the default Cash on Delivery for Cash on Delivery

    1. Hi!

      We need to inspect the code you have added. Please, contact us through our contact form – webappick.com/contact

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

6,112,999+ Downloads. 624+ plus 5-star ratings. Promote products on any platform you want.