🔥 Just Launched! Werra Premium Template for HyväSee it in Action

How to Check if Magento 2 Order is Invoiced or Shipped

By Sanjay JethvaUpdated on May 22, 2025 1 min read

The internet has changed how people shop. Moreover, varied methods of payments, shipping has even made traditional online shopping more customized in order to increase sales and more importantly, customer experience!

However, with such advances, the old-age process of placing an order, payment, invoicing, and then the shipment may be invalid in some cases. For example, the cash on delivery option needs the order to be first shipped, and then the invoice is generated!

To implement the out-of-way function in the Magento 2 store, the foremost requirement is to check the status of an order. You need to check if Magento 2 order is invoiced or shipped and the post tells you how to do so!

Check if the Magento 2 Order is Invoiced:

    if ($order->getInvoiceCollection()->count()) {
                //do your stuff here
        }

        or you can use

    if($order->hasInvoices()){
            //do your stuff here
        }

Check if Magento 2 Order is Shipped:

  if ($order->getShipmentsCollection()->count()) {
                //do your stuff here
        }

    or you can use

 if ($order->hasShipments()) {
                //do your stuff here
        }

So any time you may want to check the order status of your Magento 2 store, bookmark these methods for reference!

Thank you.

Sanjay Jethva Full Image
Article bySanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.