---
title: "How to Get Order Status in sales_order_place_after event in Magento 2"
url: "https://magecomp.com/blog/get-order-status-sales-order-place-after-event-magento-2/"
date: "2018-09-24T16:48:43+00:00"
modified: "2025-02-21T10:33:04+00:00"
author:
  name: "Dhiren Vasoya"
  url: "https://magecomp.com/"
categories:
  - "How To"
  - "Magento 2"
word_count: 290
reading_time: "2 min read"
summary: "Ordering and receiving products at home are easy and look simple but it is not as easy as you think for the store owner. Because once customer place an order, it process and passes through differen..."
description: "Ordering product seems easy but this order passes through from different order status before it reaches to the customer. Sometimes we need to get order statu..."
keywords: "How To, Magento 2"
language: "en"
schema_type: "Article"
related_posts:
  - title: "How to Set Up Cron Jobs in Magento 2"
    url: "https://magecomp.com/blog/set-up-cron-jobs-in-magento-2/"
  - title: "How to Reorder Product Tabs in Magento 2?"
    url: "https://magecomp.com/blog/reorder-product-tabs-magento-2/"
  - title: "How to Get Active Shipping Methods based on Quote ID in Magento 2?"
    url: "https://magecomp.com/blog/get-active-shipping-methods-based-on-quote-id-magento-2/"
---

# How to Get Order Status in sales_order_place_after event in Magento 2

_Published: September 24, 2018_  
_Author: Dhiren Vasoya_  

![How to Get Order Status in sales order place after event Magento 2](https://magecomp.com/blog/wp-content/uploads/2018/09/How-to-Get-Order-Status-in-sales-order-place-after-event-Magento-2-1024x332.webp)

Ordering and receiving products at home are easy and look simple but it is not as easy as you think for the store owner. Because once customer place an order, it process and passes through different **[Magento 2 order Management statuses](https://magenticians.com/optimize-magento-2-order-management/)** like New Order, Pending, Payment Processing, On Hold, Complete, Canceled. But while developing or custom coding, sometimes we need to fetch current order status like payment is successfully done or not? or to fetch order state for creating or setting up further rules and conditions to fulfill business requirements.

[![](https://magecomp.com/blog/wp-content/uploads/2022/05/Mobile-App.png)](https://magecomp.com/magento-2-mobile-app-builder)

Here we back with a small piece of code to get Order status in sales_order_place_after event.
To do the same first you need to create observer into events.xml

**app\code\Vendor\Extension\etc\events.xml**

```
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="sales_order_place_after">
 <observer name="vendor_sales_order_place_after" instance="VendorExtensoinObserverOrderObserver" />
</event>
</config>
```

[![Magento 2 Speed & Performance Optimization Services](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-2-Speed-Performance-Optimization-Services-CTA-2.webp)](https://magecomp.com/services/hyva-theme-development/)

After that, you need to create Observer file at following location.
**app\code\Vendor\Extension\Observer\OrderObserver.php**

```
<?php
namespace VendorExtensionObserver;

use MagentoFrameworkEventObserverInterface;

class OrderObserver implements ObserverInterface
{
    public function execute(MagentoFrameworkEventObserver $observer)
    {
         $statuscode = $observer->getEvent()->getOrder()->getStatus();
         $statuslabel = $observer->getEvent()->getOrder()->getStatusLabel();
     }
}
```

You can use this code according to your need of getting order status anywhere inside [custom development](https://magecomp.com/magento-custom-development.html) or custom extension.

Lastly, smash that stars if the code worked for you and don’t forget to comment down below if you are looking for any help regarding this code.

Happy Coding.

[![Magento-development-services](https://magecomp.com/blog/wp-content/uploads/2020/06/Hire-Magento-4.png)](https://magecomp.com/magento-development-services?utm_source=magecomp&utm_medium=blog&utm_campaign=cta)


---

_View the original post at: [https://magecomp.com/blog/get-order-status-sales-order-place-after-event-magento-2/](https://magecomp.com/blog/get-order-status-sales-order-place-after-event-magento-2/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-11-05 02:31:13 UTC_  
