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:

Leave a Reply

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

five × 5 =