Search by

yireo / magento2-deleteanyorder2

yireo

Delete any Magento order safely from the database

Package info

github.com/yireo/Yireo_DeleteAnyOrder2

Homepage

Type:magento2-module

pkg:composer/yireo/magento2-deleteanyorder2

Fund package maintenance!

yireo

www.paypal.me/yireo

Statistics

Installs: 6 972

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 0

1.1.0 2026-11-25 19:03 UTC

This package is auto-updated.

Last update: 2026-12-01 22:21:16 UTC


README

Magento version PHP version License Latest Version

MSI reservations

When MSI (Magento_InventoryReservations) is installed, deleting an order also deletes its rows in the table inventory_reservation, so that the reserved quantity becomes salable again. Reservations of orders that were deleted earlier are listed by bin/magento deleteanyorder:analyse and removed by bin/magento deleteanyorder:fix. As an alternative, MSI can compensate them: bin/magento inventory:reservation:list-inconsistencies -r | bin/magento inventory:reservation:create-compensations.

Adobe Commerce sales archive

On Adobe Commerce, the Sales Archive (Magento_SalesArchive) moves grid rows of archived orders into the tables magento_sales_order_grid_archive, magento_sales_invoice_grid_archive, magento_sales_shipment_grid_archive and magento_sales_creditmemo_grid_archive. Deleting an order also deletes its rows in these tables. Rows of orders that were deleted earlier are listed by bin/magento deleteanyorder:analyse and removed by bin/magento deleteanyorder:fix. On Magento Open Source and Mage-OS these tables do not exist and are skipped.

Unit tests

Install this module via composer in Magento 2 and then run:

vendor/bin/phpunit vendor/yireo/magento2-deleteanyorder2/Test/Unit/

Integration tests

Follow the procedure of Magento to setup integration tests. Then add a test suite that points to the Test/Integration folder of this extension.

Todo

  • Check existance of related downloadable links
  • Fix grids automatically
  • Reset increment IDs for orders, shipments and invoices
  • Reset stock

Current status

Static Tests Unit Tests Integration Tests Playwright DI Compilation