3

How to check if the order is shipped or invoiced by store owner from order object.

$this->registry->registry('current_order');

I have current order object, I want to know if its been shipped or invoiced

Thanks

11
if ($order->getInvoiceCollection()->count()) {
    // Invoice exist.
}

if ($order->getShipmentsCollection()->count()) {
    // Shipment exist.
}

Alternatively you can also do by,

$order->hasInvoices() // For Invoice

$order->hasShipments() // For shipment

Where $order is the current order object

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.