Important

You are browsing documentation for version 6.1 of OroCommerce, supported until 2029. Read the documentation for the latest LTS version to get up-to-date information.

See our Release Process documentation for more information on the currently supported and upcoming releases.

CLI Commands (OrderBundle) 

oro:cron:draft-session:cleanup:order 

The oro:cron:draft-session:cleanup:order command initiates the cleanup of outdated draft orders and order line items via the message queue. It is scheduled to run automatically at midnight every day. Deletions are performed asynchronously, so make sure that the message consumer processes (oro:message-queue:consume) are running for the scheduled deletions to be executed.

Run with the default lifetime of 7 days:

php bin/console oro:cron:draft-session:cleanup:order

Use the --draft-lifetime option to change the threshold (in days). Draft orders and line items whose updatedAt timestamp is older than this value will be scheduled for deletion:

php bin/console oro:cron:draft-session:cleanup:order --draft-lifetime=30