how to edit custom order status in woocommerce

How to add and edit custom order status in WooCommerce

Do you want to add and edit custom order status in WooCommerce? They can be very useful to give better clarity about the order statuses of your customers.

By default, WordPress and WooCommerce don’t let you add custom order status. But with the help of codes, we can add them to your online store and edit them in no time.  However, let’s have a look at why you might need to add or edit custom order status in WooCommerce before we start the process.

Why Add and Edit Custom Order Status in WooCommerce?

Proper order status usage is very important to ensure the purchase process on any online store. In an eCommerce website, there can be several steps that customers must go through to complete a purchase. Of course, these additional steps will result in fewer sales.

Alternately, the fewer order status we need to handle, the better sales rate an eCommerce store will have. On top of that, it will also make things easier and simpler to manage the overall website.

However, we will need at least two types of order statuses in all the cases. The first type of order status is needed when the user places an order successfully. It can be set to pending payment, processing, or on hold.

Similarly, we also need another order status that resembles that the order is completed. Here, the customer may have made a payment and received the product. But if the order is not completed due to any unfortunate event, it may even be set as failed, canceled, or refunded.

So altogether, we have the following default order statuses available in WooCommerce which we can use freely:

  • Pending payment
  • Failed
  • Processing
  • Completed
  • On hold
  • Canceled
  • Refunded

These order statuses are quite adequate for any eCommerce website. They’re even more than enough for what the average website can use.

But if these default statuses are still not enough for you, you’ll definitely have to create some custom statuses for your online store. Adding them to your website will surely give your customers a clearer understanding of the status of their WooCommerce orders. For example, if you want an order status to specifically inform the customers that their order is an awaiting call, you will need to add a custom WooCommerce order status.

How to create a WooCommerce Custom Order Status?

WooCommerce orders are treated as a special custom post type. Therefore, it has a post_status value attached to it on the wp_posts table of the database in the same way as any other post type.

So, in order to include our custom order status in the available status list, we need to use the register_post_status() WP inbuilt function.

But before we proceed, please make sure that you create a child theme programmatically or by using one of the child theme plugins to make these changes. This ensures that the customizations that you make to the theme files won’t be altered when you update your WordPress theme. Similarly, we would also remind you to backup your WordPress website so that you can restore your website if any unnecessary modifications are made by accident.

1. Access the functions.php file

To create and edit a custom order status in WooCommerce, you’ll need to access the theme function file first. First, go to Appearance > Theme File Editor from your WordPress dashboard. Then, select the “funtions.php” file from the theme files on the right side of your screen.

2. Add the codes to the functions.php file

Now, copy and paste the following script on the functions.php file of your child theme. This will create a new custom order status named “Waiting call”.

// Register new status
function register_wait_call_order_status() {
register_post_status( 'wc-waiting-call', array(
'label'                     => 'Waiting call',
'public'                    => true,
'show_in_admin_status_list' => true,
'show_in_admin_all_list'    => true,
'exclude_from_search'       => false,
'label_count'               => _n_noop( 'Waiting call (%s)', 'Waiting call (%s)' )
) );
// Add custom status to order status list
function add_wait_call_to_order_statuses( $order_statuses ) {
$new_order_statuses = array();
foreach ( $order_statuses as $key => $status ) {
$new_order_statuses[ $key ] = $status;
if ( 'wc-on-hold' === $key ) {
$new_order_statuses['wc-waiting-call'] = 'Waiting call';
return $new_order_statuses;
add_action( 'init', 'register_wait_call_order_status' );
add_filter( 'wc_order_statuses', 'add_wait_call_to_order_statuses' );

Note that we are using a couple of hooks here. The first one is wp_init() and it is used to register our new status. Once the status is registered, this function is not needed anymore, you can remove this hook and its function callback after done.

And the second one is  wc_order_statuses() filter hook, which includes the new order status in the available list. So can be used when attaching it to an order from the WooCommerce admin dashboard.

You can see the new custom order status when you edit any of the orders from WooCommerce > Orders from your WordPress dashboard. Then, click on the status option and the “Waiting Call” order status will be displayed in the dropdown menu.

edit custom order status in woocommerce create custom order status

Edit an existing order status on WooCommerce

We can also use the same filter hook seen on the previous sample script  wc_order_statuses() to change the name of the existing order status.

The following sample code will edit two order stats: “processing” and “completed”, changing them to “in progress” and “delivered”:

function QuadLayers_rename_status( $order_statuses ) {
foreach ( $order_statuses as $key => $status ) {
if ( 'wc-processing' === $key ) {
$order_statuses['wc-processing'] = _x( 'In progress', 'Order status', 'woocommerce' );
if ( 'wc-completed' === $key ) {
$order_statuses['wc-completed'] = _x( 'Delivered', 'Order status', 'woocommerce' );
return $order_statuses;
add_filter( 'wc_order_statuses', 'QuadLayers_rename_status' );

Don’t forget to Update the file after you add the codes to it.

That’s it! This is how you can edit an existing or custom order status on your WooCommerce website.

edit custom order status in woocommerce Rename order status woocommerce

Remove an order status in WooCommerce

Again, the wc_order_statuses() will be useful to remove a specific order status. In this case, we are removing the “refunded” order status.

Use the following script in order to remove an existing order status. This will work for both default order statuses and for custom ones.

function QuadLayers_remove_status( $statuses ) {
if( isset( $statuses['wc-refunded'] ) ){
unset( $statuses['wc-refunded'] );
return $statuses;
add_filter( 'wc_order_statuses', 'QuadLayers_remove_status' );

Be aware that if you remove a default WooCommerce order status, this might possibly break integration with some payment gateways.


These are some of the various ways to add and edit the custom order status in WooCommerce with the help of codes. They can be even further modified to edit and remove even the default existing WooCommerce order statuses. However, you only need to add new custom order statuses or edit the existing ones if the default order statuses aren’t enough for you and the needs of your customers.

As you can see, it is really easy to add and edit a custom order status on your online store. But you do need to have a basic understanding of how to use WooCommerce hooks. Similarly, if you want to learn more about WooCommerce orders, we even have detailed guides on how to test, repeat, delete, and even autocomplete orders in WooCommerce.

So have you tried to edit and add the order statuses on your website? Please let us know in the comments.

In the meantime, feel free to have a look at some more of our posts that might be helpful for you: