Log in
Model

CleanExpiredOrders

Magento\Sales\Model\CronJob\CleanExpiredOrders

What it does

This class automatically cancels pending payment orders that have exceeded their configured lifetime.

It runs as a scheduled cron job, checking each store's configuration to determine how long orders should remain in pending payment status before being automatically cancelled.

Developers would use this to ensure stale pending orders don't accumulate in the system.

Public Methods

  • execute()