Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($order->getInvoiceCollection()->count()) {
- $_invoices = $order->getInvoiceCollection();
- if ($_invoices) {
- foreach ($_invoices as $invoice) {
- $invoice->delete();
- }
- }
- }
- $items = $order->getAllItems();
- foreach ($items as $k => $item) {
- echo $item->getId() . "n";
- $item->setQtyInvoiced(0);
- $item->save();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement