How to Get Order Status Label in Magento 2

How to Get Order Status Label in Magento 2

The Magento 2 store admin can check the order status in the order view by navigating to Stores > Settings > Order Status grid.

The order status in any E-commerce store is an important metric based on which the admin needs to further act, be it offer the coupon code for next purchase, or mark the payment as complete, or upgrade the customer group after the order is complete.

Similarly, order status is important in Magento 2 store too and admin may often require the order status reference to carry out different functions.

Now apart from the default Magento 2 grids, the admin may want to display the order status labels in the custom grid or somewhere in the frontend for the customers’ reference.

Also, the admin may need to get order status label in Magento 2 while carrying out the order management.

The order status label displays the current status of the particular customer’s order, and it changes according to the status of an order. i.e., Processing, Suspected Fraud, Pending Payment, On Hold e.t.c.

Follow the below code to get the order status label and use the solution wherever you want to display order status label.

Method to Get Order Status Label in Magento 2

Use the below code:

That’s all!

If you have any doubts regarding this post, just mention them in the Comments section below.

I would be happy to help.

Feel free to share the solution with Magento Community via social media.

Thank You.

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

(based on 8 Reviews)

An expert in his field, Jignesh is the team leader at Meetanshi. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.

Leave a reply:

Your email address will not be published.