Home > Docs > WooCommerce PDF Invoices, Packing Slips and Credit Notes Plugin > Auto Reset WooCommerce Invoice Numbers Annually

Auto Reset WooCommerce Invoice Numbers Annually

Last updated on November 8, 2024

The WebToffee’s WooCommerce PDF Invoices, Packing Slips, and Credit Notes plugin allows store owners to customize the invoice numbers of their store by adding a prefix or a suffix or by choosing between the order number or a custom number as the invoice number. In addition to this, the plugin also provides an option to automatically reset the WooCommerce invoice numbers annually. In this article, we will guide you through the steps involved in resetting the invoice numbers annually. Below are the brief steps involved in the same:

  1. Select ‘Custom numbers‘ for invoices.
  2. Specify a prefix, a suffix, or both containing year [Y].
  3. Input a starting number for invoices.
  4. Enable the ‘Reset invoice number automatically every year‘ option.
  5. Save the Settings.

Note:

To ensure the annual reset feature functions properly, the following conditions must be fulfilled:

  1. Use custom numbers for invoices.
  2. Add a prefix or suffix with the year [Y] placeholder.
  3. Enable the ‘Reset invoice number automatically every year’ option.

Reset invoice numbers annually

Below are the detailed steps:

Step 1: Select ‘Custom numbers‘ for invoices

  1. Navigate to Invoice/Packing > Invoice from the WordPress dashboard.
  2. Under the General tab, head to the Invoice number section and find the Invoice number format option.
Navigating to the Invoice number format option
Navigating to the Invoice number format option
  1. From the dropdown, select ‘Custom number‘ for invoices.
Selecting custom numbers as invoice number
Selecting custom numbers as invoice number

Step 2: Specify a prefix, a suffix, or both containing year [Y]

  1. Now, specify a prefix, a suffix, or both containing the placeholder year [Y]. To add a year as either the prefix or suffix, click on the three-dot menu, then select ‘Choose a date,’ and pick the date format string indicating the year [Y].

Step 3: Input a starting number for invoices

  1. Next, input a starting number for the invoice number series. This will serve as the initial number following each annual reset, with the latest number specified taking precedence.
Specifying a starting number for invoices
Specifying a starting number for invoices

Step 4: Enable the ‘Reset invoice number automatically every year‘ option

  1. Head to the ‘Reset invoice number automatically every year’ option and enable it.
Enabling the option to reset invoice numbers annually

Step 5: Save the Settings

  1. Click on Update Settings to save the changes.

After configuring the annual invoice number reset functionality correctly, you can monitor its status by navigating to WooCommerce > Status > Scheduled Actions. Within this tab, you will find a hook named “wt_pklist_restart_invoice_number_event” associated with the reset functionality.

Scheduled action corresponding to the reset invoice number functionality
Scheduled action corresponding to the reset invoice number functionality

As the image above indicates, under Scheduled Actions, you can review the status of the action, its recurrence duration, the scheduled date for its next occurrence, and the time of action creation.