Commands 

order:cleanup 

The order:cleanup command requires the date before which all orders are to be set to deleted (cutOffDate) as an argument. The format for this date only accepts the format YYYY-MM-DD.

# Remove all orders created before 1st January 2025
vendor/bin/typo3 order:cleanup 2025-01-01
Copied!

The DataHandler is then used to process all orders before this date.

The order history (table tx_cart_domain_model_order_change) of these orders is removed from the database directly, also the one of orders before this date which were deleted before, e.g. in the list module.

Restrictions:
No special cases such as belonging to a frontend user are taken into account. There is no interaction with the user of the command. No execution via the scheduler is planned.