Since 28th December 2022, this plugin version has been discontinued for purchase. However, support will be continued for existing users. Post the aforementioned date, users who purchase the plugin, which now is made available as multiple add-ons, must refer to their corresponding setup guides. The drag-and-drop customizer feature is now available for purchase as an add-on.

WooCommerce PDF Invoices, packing slips and credit notes plugin | WooCommerce Shipping labels, Dispatch labels and Delivery notes plugin | WooCommerce Address labels plugin | WooCommerce Picklists plugin | WooCommerce Proforma invoices plugin | Customizer for WooCommerce PDF Invoices

Since 28th December 2022, this plugin version has been discontinued for purchase. However, support will be continued for existing users.

How to reset/delete existing invoice numbers

Last updated on October 23, 2023

The invoice number is one of the most important components of an invoice. Every invoice should possess a unique invoice number assigned sequentially for easy auditing. 

However, if you have a large number of orders that you may not want anymore, you can delete the invoice numbers of those orders and reuse the same invoice number on new ones. 

For example, say you have a thousand order invoices with invoice numbers from 1 to 1000 and you have already completed its auditing. You can delete the invoice numbers of these invoices and reset the invoice counter to 1. This way, the next invoice generated will have an invoice number of 1 instead of 1001. 

Let us see how we can delete the existing invoice numbers using the WebToffee plugin – PDF Invoices and Packing Slips Plugin for WooCommerce.

Delete or Reset WooCommerce Invoice Numbers

The existing invoice numbers generated with the plugin ‘WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Labels’ can be deleted using a custom tool or via a code snippet.

Delete invoice number using a custom tool 

To delete all the existing invoice numbers, 

1. Navigate to Invoice/Packing > Invoice > General.

2. Remove all the order statuses selected under the Create invoice automatically.

create invoice automatically with plugin

3. Go to WooCommerce > Status > Tools from your WordPress admin dashboard. 

4. Scroll down to Delete all generated invoice numbers and click on Delete

Delete all generated invoice numbers in WooCommerce

Deleting invoice number via code

To remove all the invoice numbers generated,

  1. Make sure that the Create invoice automatically field under Invoice/Packing > Invoice > General is empty.
  2. Remove order statuses for invoice generation
  3. Add the following code to the end of the active theme’s functions.php file.
    delete_post_meta_by_key( 'wf_invoice_number' );
  4. delete invoice with code
    Delete code added at the end of the functions.php file
  5. Now, remove the code delete_post_meta_by_key( ‘wf_invoice_number’ ); placed in the active theme’s functions.php to proceed (This step is mandatory).

Alternative method

The plugin stores the invoice number under the meta key wf_invoice_number and is contained in the table wp_postmeta. If you have access to the SQL DB of your website you can delete it with an SQL query.

To reset and generate a different invoice number for the orders, refer to the article on creating/resting WooCommerce invoice numbers