Delete orders including all related information such as invoices, shipments and credit memos via backend, command-line or REST API.
This Magento 2 modules allows admin users to delete orders including all related information such as invoices, shipments and credit memos via backend, command-line or REST API.
A admin user can delete unwanted orders ( e.g test orders ) without having a developer / agency involved.
A new option Delete
to the Actions
dropdown in the Sales > Orders
grid.
CLI command called magenizr:order:delete
.
REST API endpoint /V1/order/:orderId
.
A list Restrict Order Status
in Stores > Configuration > Magenizr > Delete Orders
allows the admin user to limit the delete feature to specific order statuses only.
A drop down Availability
that can be used to limit the availability to Backend
, Command-Line
, REST API
or All
.
It clears all related order information which are stored in the following tables.
sales_invoice, sales_invoice_grid, sales_shipment, sales_shipment_grid, sales_creditmemo, sales_creditmemo_grid
System > Permissions > User Roles
. The ACL resource is Stores > Configuration > Delete Orders
.Stores > Configuration > Magenizr > Delete Orders
.Delete
in the dropdown Actions
is available on Sales > Orders
. Once the popup message Are you sure you want to delete selected items?
is confirmed, the module will deleted selected items and display a success message Total of X order(s) were deleted successfully.
.magenizr:order:delete
can be used to delete one or multiple ( comma separated ) order ids. For example:bin/magento magenizr:order:delete 100000001
bin/magento magenizr:order:delete 100000001,100000002,100000003
bin/magento magenizr:order:delete 000000001,34234
Order ID 000000001 successfully deleted.
Order ID 34234 does not exist.
/V1/order/:orderId
and method DELETE
.===== 1.1.0 =====
<route url="/V1/order/:orderId" method="DELETE">
1.0.2
1.0.1
1.0.0