How to add WooCommerce custom order status?

Posted by Prem Tiwari | Updated on

If you want to add WooCommerce custom order status? The order status that you’re registering wc-custom-order-status is too long – 22 characters. This results in saving only the first 20 characters of the post status, which makes it invalid and causes your issue. The order statuses are registered as post statuses, and post statuses have a limitation of 20 characters.

I suggest that you update your wc-custom-order-status status name to wc-shipping-progress, which is exactly 20 characters in length. I am also posting the updated version of your code, just for reference (I’ve only changed the status name):


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers