Title: random number order
Last modified: August 22, 2016

---

# random number order

 *  [strue](https://wordpress.org/support/users/strue/)
 * (@strue)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/random-number-order/)
 * Hi, after update to woocommerce 2.2 my order sequence is NOT random why? and 
   how solve this and get again random order number?
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [ManusH](https://wordpress.org/support/users/manush/)
 * (@manush)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/random-number-order/#post-5329926)
 * Order numbers may NOT be sequential but NEVER was random.
    The value used for
   the order-id was taken from the database, from “posts” table, according to the“
   order item” tables “id” variable, etc.
 * So, if any new data is recorded to the database then that counter will increase,
   and when there is a new order then it will take a bigger value then the latest
   order, not just +1. But if no new data recorded to the database between orders,
   then the id-s look sequential.
 * So, originally, the order-id values seemed like a random array, but it is just
   because having any gap or not.
 * To make the order-id’s sequential, some extensions are needed,
    like: [http://www.woothemes.com/products/sequential-order-numbers-pro/](http://www.woothemes.com/products/sequential-order-numbers-pro/)
 *  Thread Starter [strue](https://wordpress.org/support/users/strue/)
 * (@strue)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/random-number-order/#post-5329932)
 * Hi, thanks for response,
    you are right is not random but was sequential +2 or
   +3 and don’t remember if add post or page. Indeed i can’t see in woocommerce 
   changelog modified in this sense. Anyway not there a function or filter to use
   random order without install plugin and extensions?
 *  [ManusH](https://wordpress.org/support/users/manush/)
 * (@manush)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/random-number-order/#post-5329947)
 * I was trying to say,
    that “randomness” or “sequential” look was just an illusion.
 * In fact, if there are some other records between orders, then the order id will
   not be +1, it will change according to the inputs recordede to the table.
 * But if there is no change between orders, then there won’t be any gap between
   order ids, just +1. So maybe in your previous experiences, to have some increments
   like +2, +3 all depends on that other changes made in your side wide.
 * Btw, it is a site-wide change, not just only order manegements, changes, or Woocommerce
   inputs.
 * In one of my test configuration, order ids for the last week line up like this:
   
   2617 2616 2615 2612 2585 2584 2581 2580 2579 2574
 * That big-gap (2585~2612) was occured when I made lots of updates, change some
   prices and add some news, etc…
 * Btw, that extension was to make those ids sequential, for official/invoice needs.
 *  [ManusH](https://wordpress.org/support/users/manush/)
 * (@manush)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/random-number-order/#post-5329950)
 * For the exact source of that order-id value,
    you can check it from your database,
   the “xxx_post” table.
 * the “ID” value becomes “order id” where the “post title” values have “Order…”
   info.
 * Those are also stored in another table: xxx_woocommerce_order_items
    “order_item_id”
   is the tables sequential id value, and the “order_id” links to those post-ids
   on the other table…
 * etc…
 *  Thread Starter [strue](https://wordpress.org/support/users/strue/)
 * (@strue)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/random-number-order/#post-5329961)
 * Yes i checked you are right!
    The problem is if want make only order id random
   between a certain number. Example : from 12345 (5 number) to 1234567 (7 number)
   it’s is possible to make this? Anyway thanks for info

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘random number order’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [strue](https://wordpress.org/support/users/strue/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/random-number-order/#post-5329961)
 * Status: not resolved