How invoice numbering and XML generation work based on order status

Configurationwordpress2026-07-01

Goal

Understand exactly when POP assigns the invoice number and when it generates the XML, to avoid mismatches between document numbering and dates.

When the invoice number is assigned

The number is assigned the first time the order moves to “Processing” or “Completed” status (whichever comes first). From that point on, the order already has a sequential number, even if the document hasn’t been sent to the customer yet.

When the XML is generated

By default, the XML is generated when the order reaches “Completed” status (this behavior can be customized via a filter for developers, not through a UI setting). For refunds, POP automatically generates the credit note XML the moment the refund is registered in WooCommerce — no manual action is needed just to generate the document.

If you use an add-on that transmits to an external accounting software (e.g. Fatture in Cloud, Aruba), sending to the external software may still require a manual upload from the “Invoices” tab depending on the add-on’s configuration: check the specific behavior in the active add-on’s configuration, since it can differ from what’s described here for the native flow.

The invoice date depends on when it’s sent

This is the point that causes the most confusion:

Mismatch example:

  1. 01/04 — Order #101 moves to Processing → invoice no. 1 generated, not yet sent.
  2. 01/07 — Order #102 moves to Processing → invoice no. 2 generated and sent dated 01/07.
  3. 03/04 — Order #101 is completed and invoice no. 1 is only sent now → the date updates to 03/04.

Result: invoice no. 2 has a date (01/07) earlier than invoice no. 1 (03/04), even though it has a lower number.

Verify

Before sending invoices in bulk, check in the Invoices tab that numbering and dates are consistent (increasing number = increasing date).

Common errors

For the credit note and its requirements, see credit-note-generation; for where/how the XML files are stored, see generated-files-storage.