Order status offered by woocommerce were not enough for my project. I wanted to create some new custom statuses for my shop. Here's a simple and easy code snippet that I've used to introduce new order status.

New Order Statuses that I wanted to add

  • Prepare For Delivery (Preparing the delivery items, packing and levelling them)
  • Shipping In Progress (Send it to the courier)
  • On Call Verification (Calling the user and verifying details)

Solution

In your function.php or in your plugin code copy paste the given gist by replacing your status name and level. If you want to add multiple status, repeat the process or use the same functions with multiple statements.

Used Wordpress Filter Hooks

  • init - For registering new order status
  • wc_order_statuses - Add our newly created status to WooCommerce

Hope this helps!