The mystery of the missing WooCommerce order numbers

Missing-WooCommerce-Order-Numbers

One of our WordPress clients was recently concerned that there were gaps in the ID numbers of the orders on her WooCommerce website.

At first, I assumed that the missing order numbers were due to some test orders that we had deleted as part of the web design process. However, it kept happening so we investigated and discovered a simple plugin to fix the problem.

GET THE PLUGIN NOW

Why are my WooCommerce order numbers not sequential?

The answer is fairly obvious if you know how WordPress works behind the scenes. However it wasn't obvious to me - and millions of people use WooCommerce, so I'm sure I wasn't alone. I'm writing this post for anyone who is wondering about missing order numbers on their WooCommerce website.

Gaps in WooCommerce order numbers are not caused by a bug or error with the website. In fact, order numbers are not supposed to be sequential.

The way it works is that EVERY item in the WordPress database is given a unique ID number, which is allocated sequentially. This includes orders, pages, posts, images etc. so the numbers are not just used for orders.

For example, someone may place an order which is assigned the ID 17004 and then you might add a new post which is given the ID 17005. The next person who places an order will be assigned the ID 17006, so 17005 will look like a missing order number. It's not a missing order number - 17005 has simply been used for a post instead of an order.

This means that looking at the order numbers is not a good way to track your WooCommerce orders.

What's the alternative?

The WooCommerce Sequential Order Numbers plugin fixes the problem. It allocates custom order numbers to your WooCommerce orders. These are sequential  - with no gaps - as they're not used for anything else. They work by creating a dedicated 'order number' field in the database which is separate from the WordPress ID.

This simply plugin is really handy if you want your WooCommerce orders to be sequential.

GET THE PLUGIN NOW

29 Comments

  1. My woocommerce is having a problem where success order email admin received and that order ID got missing. Any such way to track those real order missing?

    • Hi, Anurag. Thanks for chiming in.

      I'm sorry to hear you're having difficulty with an issue wherein you've received a notification/email about a completed or submitted order, but which is not displayed or shown in the list of WooCommerce > Orders on your site. Rather than being due to a non-sequential order ID or number, I believe the issue you're experiencing is due to something else on your site, so I suggest that you contact the official WooCommerce.com support for the best advice about resolving it.

      I hope this helps point you in the right direction. Should you have any other questions, just let me know.

  2. I find it hilarious why so many people are complaining about this terrible platform called WordPress and Woocommerce which they paid $0 for. POOR YOU. stop complaining oh my goodness. It's such an amazing tool for free.

    • Hello, Joseph. Thanks for your comment and for your thoughts! I'm happy to hear you see the value of both WordPress as a CMS, coupled with the WooCommerce e-commerce plugin even out of the box. :)

  3. It is exceedingly irritating the number of plugins I have needed to use to almost get the functionality I need from Woocommerce in WordPress. Many of the plugins apparently cannot run properly together, so I have had to disable features that I need in order for checkout to work. The idea of having to purchase, install and vet yet another plugin on my website to get order numbers to be sequential is infuriating. After our busy holiday season is over, I will be looking for a better platform.

    • Hi, Linda.

      Thanks for your comment and I'm sorry to hear of your frustration. I understand how inconvenient it can be to use multiple plugins and the need to vet any new ones that you'd like to use to see if they'll play nice with the existing ones.

      Many share the same frustration, as it is the double-edged sword that comes with using open-source software such as WordPress. As long as the theme or plugins that you choose to use are ones that are also mindful to adhere to the WordPress Codex and its best practices, then its likely that they'll work well together on your site.

      I hope you'll reconsider, as you'll find that each platform has similar types of pain-points as this. E.g. An analogy would be using third-party software on Windows or Macs. I think using Linux as your operating system would be the equivalent of using WordPress as your CMS.

      After the holidays, I suggest you make a list of the pros that you enjoy and cons of using WordPress, to help you decide. Cheers.

  4. Yes I do also understand the "Why" but it is a foolish design. I hate that the sequencing of orders is disrupted by any work within the platform. Morons.......

    • Hi, Jeff. Thanks for your feedback. I understand and can relate how this can be such an inconvenience (to put it mildly!) and admit it got me quite confused and frustrated when I first encountered the issue. I thought I had missing orders! I would be keen to know if you come across any info about why WooCommerce developers chose to have the different types of items in the database all share the same number sequence. For now, I'm just thankful we now know what was going on with the Order number sequence and that we've found a plugin that can fix the problem. :)

  5. Thanks so much for making this article! A client recently asked me about this and I was able to quickly understand why they had gaps in order numbers because of this awesome post. Rock on!

  6. I agree that this should be included in Woo Commerce. It's just another way to extract money from users!!!

  7. Hi, I am agree with Alain Nijholt. If this problem is solved with a plugin, so why woocommerce plugin not include this functionality. This options should be included in woocommerce plugin itself.

  8. Found the answer to my question:

    " This is a unique number that WordPress uses for many things, such as posts, pages, categories, tags, products, product categories, comments and so on — WordPress will use the next available post ID for the next item it has to create."

    This is an issue since we have updated to 4.9, never had non sequantial orderns. Real bummer! Me neither want to buy a plugin for this, it should be core functionality....

    Hopefully a solution will be relaesed soon :-)

  9. Noticed the issue today. Can you give other examples (than the one below) of "changes" that use ID's?

    "For example, someone may place an order which is assigned the ID 17004 and then you might add a new post which is given the ID 17005."

    I am missing 3 ID's in the orders and I am sure we did not create a posts or any other changes I am aware of.

    Cheers!

  10. Hi, Thanks for the post.
    But I'm looking just code which can fix manually. I don't want to use the plugin. I just want to learn how to fix it.

    • Hi Sam, you would need to get a developer to code this for you as a bespoke feature. The aim of this article is to explain why WooCommerce works in this way and recommend some off-the-shelf solutions.

  11. Why did this happen all of a sudden. We have a woo commerce site for three years and this issue just started. This article claims it is normal but this is a brand new issue.

    • It's strange that your order numbers were sequential before because they have never been in their own database table, so the numbers would have been mixed up with other content types and therefore not sequential!

  12. Just what I was looking for and all straight on point. We rarely find posts keeping it crisp, short and not beating around the bush. Thanks Katie Keith.

  13. Thank You, exactly found the answer i was looking for!

  14. This is exactly what I was looking for - orders had all gone up by 1 over and over and then suddenly the numbers jumped up 20 - now I know why!

  15. Thanks Katie. Actually this was the only and clear article and explanation about the WooCommerce numbering system I could Google up. Taxation in Finland is strict and now I'm able to explain the case to the tax inspector if he or she hits me :) Keep up the good work! if the tax inspector hits me and asks me about the gaps between the orders.

  16. Thanks so much, Katie.

    I was fearing that I had numbers of people abandoning my order cart and I was trying to figure out why.

    your blog post was very helpful in allaying my fears.

    Best.
    Mike

    • Glad it was helpful. If you're worried about abandoned carts, it's worth adding an Abandoned Cart plugin.

  17. thank you for a very clear and concise write up on this. I appreciate that. My customer service team was concerned about this sequential number thing. Now, I have an explanation to give them.

    • That's great news! Yes it does seem weird at first but makes sense when you know how WordPress works behind the scenes.

  18. Thanks Katie, was looking into exactly this issue and your post answered my question in a couple of seconds!

Please share your thoughts...

Your email address will not be published. Required fields are marked *