Skip to content

Commit 5562de7

Browse files
committed
unregister current invoice after transaction is saved
1 parent 3eb80a1 commit 5562de7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Model/Service/CreateInvoice.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ public function createInvoiceGeneralSetting(Order $order, array $invoiceItems):
135135

136136
$transactionSave->save();
137137

138+
$this->registry->unregister('current_invoice');
139+
138140
$payment = $invoice->getOrder()->getPayment();
139141

140142
$transactionKey = (string)$payment->getAdditionalInformation(
@@ -225,4 +227,4 @@ public function addTransactionData($payment, $transactionKey = false, $datas = f
225227

226228
return $payment;
227229
}
228-
}
230+
}

0 commit comments

Comments
 (0)