Why Are There Gaps in My WooCommerce Order Numbers?
Why WooCommerce Order IDs Skip Numbers
Every time a customer reaches the point of an order record being created — even if they abandon checkout before completing payment, or a payment attempt fails outright — WooCommerce creates that order in the database with the next available ID, in whatever status reflects what actually happened (Pending, Failed). These orders are often hidden from the default admin view or simply not noticed, but they still consumed a number in the sequence, which is why gaps appear in the numbers a store actually sees and processes.
Common Causes of Gaps
- Abandoned checkouts that created a pending order but were never completed, quietly consuming an ID.
- Failed payment attempts, which create a real order record marked Failed even though no successful transaction occurred.
- Test orders placed during setup or testing that were later deleted, leaving a gap where that ID used to be.
- Orders genuinely deleted (rather than cancelled), which removes the visible record but doesn't renumber subsequent orders to close the gap.
What to Do About It
- Recognize that this is expected, not a sign of data loss, especially for a store with any meaningful checkout abandonment rate.
- If sequential, gap-free invoice numbers are required for accounting/legal reasons, a dedicated sequential invoice numbering plugin (separate from the underlying order ID) is the correct solution, rather than trying to force the order ID itself to be gap-free.
- Review abandoned/failed order volume periodically if the gap rate seems unusually high, since it can be a useful signal about checkout friction worth investigating separately.
Need proper sequential invoice numbering set up for accounting compliance? See custom WooCommerce development.