How to create custom invoice number in WooCommerce

How to create custom invoice number in WooCommerce

It’s likely that you may prefer to have a customized invoice number for your invoices. Their requirement may vary from having an appended date format to having a predefined invoice length etc. However, with the WooCommerce PDF Invoice, Packing Slip, Delivery notes and Shipping Label plugin you can achieve this very easily.

The plugin holds dedicated invoice number settings for configuring the number formats alone. Check out our short tutorial given below to know how the invoice number can be changed.

Create/Reset invoice number

  1. Install and activate the plugin on your WooCommerce site. Learn more about the setup of the PDF Invoice.
  2. Navigate to Invoice/Packing > Invoice from your WordPress dashboard.
  3. Head on to the Invoice number tab. You can set up a custom invoice number with prefix/suffix/number series or even mirror the order number as invoice number respectively.
WooCommerce Invoice or packing-Invoice Settings- Invoice Number

Invoice number format: Specify the format in which the invoice has to be generated. For example, [prefix][number][suffix]

Use the order number as invoice number: Choose Yes to use the order number as the invoice number. To have a custom invoice number, select No and input the necessary details into the respective fields.

Invoice Start Number: Enter the Invoice Start Number.

Custom invoice number

Invoice Number Prefix: Input a prefix value that will appear at the beginning of the invoice number. You can use any of the date formats or alphanumeric characters in this field as shown in the popup.

Date formats
Date formats

Invoice Number Suffix: Enter the suffix that will appear at the trailing end of the invoice number. You can use any of the date formats or alphanumeric characters as a suffix as shown in the image above.

Invoice Length: Indicates the total length of the invoice number padded with zeroes. For example, Input invoice number length as 7 with initial number as 8009. then, the newly generated number will be 0008009, padded with 3 zeroes.

At last, click on the Update and Reset button.

Sample Invoice

For example, if the prefix is chosen to be as [m] referring to the numerical form of the active month and the suffix as [Y] referring to the numerical form of the active year.

Let’s have a look at the invoice number with the above configuration in place.

WooCommerce Invoice sample

In the above invoice,

  • 03 is the prefix
  • the rest of the five numbers indicate the invoice length (padded with three zeroes)
  • suffix 2021

An invoice is something which is used by the customer as well as the store owner as a medium containing all the order details. Therefore, to have a personalised invoice number to denote its whereabouts can be of utmost importance.