Magento version is 2.3.2
I use the
sales_order_invoice_register event to send the invoice id to the third party API when create the invoice.
My code in the observer is :
$invoice = $observer->getEvent()->getInvoice(); $orderId = $invoice->getOrderId();` $invoiceNumber = $invoice->getIncrementId();
I Got the order id but Invoice id I got blank. Does anyone have an idea how to get invoice id?