Allows to update an order item in a new invoice, when the invoice is created manually in the Administration Area.
When users create invoices in the Administration Area, order items are copied from the original order to the invoice.
This event allows to update new invoice items before they are saved to the database. The event handler should accept two
parameters - the new order item and the old order item.
public function subscribeEvents()
{
Backend::$events->addEvent('shop:onNewInvoiceItemCopy', $this, 'process_new_invoice_item_copy');
}
public function process_new_invoice_item_copy($item, $original_item)
{
$item->x_custom_field = 10;
}