Title: Sequential Order Bug?
Last modified: March 27, 2019

---

# Sequential Order Bug?

 *  [thescarletfire](https://wordpress.org/support/users/thescarletfire/)
 * (@thescarletfire)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/sequential-order-bug/)
 * Hello. I changed my sequential order starting number last night because of a 
   new product scheme. All my test processing receipts now do not reflect the change.
   They are keeping the old numbering order.
    There is no cache to clean, no conflict
   I can possibly see with other plugins.
 * Nothing I do can prevent the old numbering starting point and “next up” number.
   It’s like the setting can’t be changed once it’s set?
 * Do you know 1) if there is a bug preventing the change of sequential ordering#
   starting numbers? or 2) how I can force a reset of the sequential starting numbers
   please?
 * Many thanks!
 * PS. I also noticed you can’t have more than 3 digits for sequential, is that 
   true? I can’t begin at say, 1450? I can’t seem to get more than XXX for those
   numbers.

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

 *  [yamo](https://wordpress.org/support/users/yamo/)
 * (@yamo)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/sequential-order-bug/#post-11603095)
 * Hello thescarletfire,
 * I am having the same issue, did you find a way to reset the invoice numbering?
 * Thanks
    -  This reply was modified 7 years, 2 months ago by [yamo](https://wordpress.org/support/users/yamo/).
 *  [Pratik Jain](https://wordpress.org/support/users/pratik-jain/)
 * (@pratik-jain)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/sequential-order-bug/#post-11610786)
 * Hi [@yamo](https://wordpress.org/support/users/yamo/) and [@thescarletfire](https://wordpress.org/support/users/thescarletfire/)
 * Once you enable the sequential number EDD will start number from it.
 * For example, If you have saved setting with 100 so when you new order is generated
   and it will take 100 order id. The next order will take 101 order id.
 * Now if we change the settings to 50 and save it then plugin will still take 102
   as a next order ID. It will not take 50 as order id.
 * So once the sequential order is started then we can not reset it. If it has been
   reset then same ID will be generated multiple times and it creates problem.
 * So once the order is placed then Sequential number will not be changed and can
   not be reset.
 *  Thread Starter [thescarletfire](https://wordpress.org/support/users/thescarletfire/)
 * (@thescarletfire)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/sequential-order-bug/#post-11613819)
 * Hi.
 * I’m sorry, but I don’t quite agree. First, I think there should be a fallback
   fail-safe if a user simply fat-thumbs the keyboard and accidentally submits a
   starting sequential invoice at 100 instead of 1001. Are you telling me there 
   is *no* way to override or reset this counter? IMO this is a huge oversight.
 * I understand obviously you can’t go down, from 100, to 50, but you should certainly
   be able to reset or change to a HIGHER number. Which is very common in businesses,
   to have higher invoice numbers like check numbers.
 * Can you please make this possible? Can we re-install the plugin? Will that reset
   the counter? I mean, this is silly 😉
 * There really needs to be a kill switch for this and trust the user that he knows
   to wipe the invoice history or starting sequential value. Or if you for some 
   reason cannot see the value in this can you at least make it so we can create
   a higher number?
 * I’ve had a client once who put the wrong number in and is stuck. Embarrassing.
   
   They meant to type 1001 but typed 100 by mistake. Now what?
 * I hope you see my point and can help. Thank you much!
 * I can’t believe the official position on the plugin here is (with no warning 
   btw, in the plugin before you hit save on that page about the seq reset):
 * _“If you typo this seq value, oh well, start your business at this invoice number
   instead of, you know, the invoices you’ve been using for years as a company, 
   because, reasons. Next time, make sure you proof it before you hit save! Enjoy
   your new invoice order.”_
 * I shant believe that 🙂
 *  [Pratik Jain](https://wordpress.org/support/users/pratik-jain/)
 * (@pratik-jain)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/sequential-order-bug/#post-11623013)
 * Hi [@thescarletfire](https://wordpress.org/support/users/thescarletfire/)
 * Sorry, I can understand your concern but fact is if you enabled the sequential
   number and if any order is placed then there is no way to reset it unless you
   reset whole store data.
 * I can provide you a little code snippet to manually reset the “sequential Number”
   field but you can use it at your own decision. You can take a backup of your 
   DB also.
 *     ```
       function _flush_sequential_number() {
       	if ( isset( $_GET['flush_seq_num'] ) && $_GET['flush_seq_num'] == 1 ) {
       		delete_option( 'edd_last_payment_number' );
       	}
       }
       add_action( 'admin_init', '_flush_sequential_number' );
       ```
   
 * Add the above code to your theme / child theme functions.php file and save it.
   Now you need to visit login to your WP dashboard and click on the dashboard menu.
 * Now add the `?flush_seq_num=1` string at last in your browser URL with current
   URL. So it looks like something `http://WP-SITE-URL/wp-admin/index.php?flush_seq_num
   =1` and run it.
 * Once you run the URL, your sequential number index will be flushed. Now navigate
   to EDD Settings > Misc > Accounting > Sequential Starting Number.
 * Add your desired number and save it but be sure you have added higher number 
   than the last payment number with sequential order.
    -  This reply was modified 7 years, 2 months ago by [Pratik Jain](https://wordpress.org/support/users/pratik-jain/).
 *  [Pratik Jain](https://wordpress.org/support/users/pratik-jain/)
 * (@pratik-jain)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/sequential-order-bug/#post-11623073)
 * Hi [@thescarletfire](https://wordpress.org/support/users/thescarletfire/)
 * Forgot to mention one thing, when you are done then you can remove the code from
   your theme.
 *  Thread Starter [thescarletfire](https://wordpress.org/support/users/thescarletfire/)
 * (@thescarletfire)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/sequential-order-bug/#post-11623610)
 * Pratik,
 * First off, your function works perfectly beautiful – I fixed my invoice numbering
   and it took 30 seconds. I am so grateful for your help, thank you!!
 * Second, perhaps you could integrate this in the plugin for other users who encounter
   this or similar issues? Just a suggestion. Or at least point this function in
   the FAQ 🙂
 * I’ve told Pippin some years ago and I’ll say it again – EDD has the best support
   I’ve found in the WordPress eco-system. Thank you to everyone involved!!!
 * I’m back in business up and running with this function reset!
 *  [Pratik Jain](https://wordpress.org/support/users/pratik-jain/)
 * (@pratik-jain)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/sequential-order-bug/#post-11626301)
 * Hi [@thescarletfire](https://wordpress.org/support/users/thescarletfire/)
 * Glad to know that your problem has been solved and thanks for your suggestion.
 * If you like the plugin then rate it and provide your feedback. You can mark the
   status as resolved also.

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

The topic ‘Sequential Order Bug?’ is closed to new replies.

 * ![](https://ps.w.org/easy-digital-downloads/assets/icon.svg?rev=3455837)
 * [Easy Digital Downloads – eCommerce Payments and Subscriptions made easy](https://wordpress.org/plugins/easy-digital-downloads/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-digital-downloads/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-digital-downloads/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-digital-downloads/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-digital-downloads/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-digital-downloads/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [Pratik Jain](https://wordpress.org/support/users/pratik-jain/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/sequential-order-bug/#post-11626301)
 * Status: not resolved