GoFactoX E-Invoicing for WooCommerce: complete changelog

The Changelog tab of the plugin page on WordPress.org shows the latest versions only. This file keeps the whole history.

== 1.6.2 ==

* Free plan: invoices and credit notes are now generated automatically (invoice at the trigger status, credit note on refund) and attached to the WooCommerce e-mails; end-of-month and custom payment terms are free too. Pro keeps the transmission to your Plateforme Agréée, the dashboard, bulk and retroactive generation, the REST API, the SEPA QR code and the AVOIR watermark.
  - Automatic generation, automatic credit notes and the e-mail attachments no longer test the plan. Their options ("Auto-Generate Invoices", "Auto-Generate Credit Notes", "Attach to Emails", Automation section) were ticked at activation and did nothing on the free plan: on a site updated from an earlier version they now start working. A dismissible admin notice says so; untick the options to keep generating by hand.
  - The credit notes section of the order screen, the manual credit note action and the "missing invoice" flag of the orders list work on every plan.
  - The end-of-month (30 and 45 days) and custom payment terms are no longer replaced by "Net 30 days" on the free plan, and the structured SEPA credit transfer (IBAN and BIC, BG-17) is written in the XML on every plan. The "(Pro)" labels of these options are gone.
  - Still Pro: transmission to the Plateforme Agréée, dashboard, bulk and retroactive generation, REST API, SEPA QR code, AVOIR watermark. Still Business: FEC export and 5 sites.
* New: a 3-step checklist at the top of the settings, company address pre-filled from WooCommerce, and a clearer VAT exemption (franchise en base) checkbox before the VAT number.
  - The checklist "Your first invoice in 3 steps": 1) company details complete (it lists what is missing), 2) "Preview an invoice" opened, 3) a document generated from WooCommerce > Orders. It disappears when the three steps are done or with "Hide this checklist"; its footer links to the setup guide, the support forum and "Copy diagnostic".
  - Address, postal code and city are pre-filled from the WooCommerce store address as long as you have not saved your own ("Pre-filled from WooCommerce: check, then save."). Empty address values stored by earlier installations are released so that the pre-fill shows.
  - The VAT exemption checkbox (article 293 B) now comes before the VAT number. The VAT number is no longer starred ("Required unless you are VAT-exempt (franchise en base)") and its placeholder shows the French VAT number derived from a valid saved SIRET. The "company information incomplete" notice points to the checkbox when the VAT number is missing.
  - The "Preview an invoice" button moved up, right after the VAT number. The "Show B2B fields at checkout" setting is no longer the last section and says what it does (default unchanged: on).
* New: WooCommerce > GoFactoX menu entry on every plan, "See plans" and help links (setup guide, support forum), and a dismissible invitation to leave a review after 5 invoices.
  - The WooCommerce > GoFactoX page exists on the free plan too (it answered "permission denied" before): a light page with Settings, Orders, Setup guide and Support forum buttons, the Pro plan offer and the ten latest documents. The full dashboard stays with the Pro plan.
  - "See plans" links in the Plateforme Agréée section of the settings, on the order screen (transmission panel and error panel) and in the FEC panel. "Setup guide" action link, and "Setup guide" and "Support forum" links, on the Plugins page. "Copy diagnostic" is available on every plan and the generic failure message points to it.
  - Review invitation: shown on the GoFactoX settings tab, the GoFactoX page and the Plugins screen, to users who manage the shop, on production sites only, once 5 documents have been issued and 7 days have passed since the oldest one. It stays away while the company information is incomplete, for 7 days after a generation failure and while an error or warning notice is waiting. "Leave a review" opens https://wordpress.org/support/plugin/gofactox-e-invoicing-for-woocommerce/reviews/#new-post, "Later" postpones the invitation by 30 days (twice at most), "Dismiss" ends it for that user. Nothing is offered in exchange and no rating is suggested.
* Fixed: real VAT rates on shipping, fees and discounts in the XML (4.92 excl. VAT of shipping could show a 19.90% line instead of 20%).
  - The rate was deduced from the rounded tax amount (4.92 excl. VAT + 0.98 VAT = 19.9%), which produced a 19.90% line next to a VAT summary at 20% (EN 16931 rules BR-S-08 and BR-CO-17: probable rejection by the Plateforme Agréée, wrong rate on the PDF). The rate is now read from the tax rows recorded on each shipping and fee item; without any, the WooCommerce rate closest to the implied one is used (within 0.5 point), else 0.
  - Shipping is listed with one line per VAT rate. Refunds and credit notes follow the same rules. VAT breakdown rows recorded under the same rate are merged into one.
  - Discounts: the invoice lines carry the prices before the discount, and the discount is declared as document-level allowances (BG-20), one per coupon and VAT rate (also for a coupon spread over several VAT rates or a discount without coupon), so that the taxable amount of each VAT rate equals its lines minus its allowances (BR-CO-10, BR-CO-13, BR-S-08).
* Fixed: XML totals of orders with a coupon (the discount was counted twice: line totals, allowances and VAT bases now match WooCommerce to the cent), coupons spanning several VAT rates, 100% discounts and amount-only credit notes.
  - Before: LineTotalAmount was computed as the net total plus the discounts while the lines were already net, so BR-CO-10 and BR-CO-13 failed and the VAT basis (BR-S-08) was off by the discount on every order with a coupon; a coupon over two VAT rates was declared as one exempt allowance; a line discounted at 100% lost its rate; an amount-only credit note had a VAT basis of 0.00.
  - Now: lines carry the price before the discount, one allowance (BG-20) per coupon and VAT rate carries the discount with its rate, VAT bases per rate equal gross minus discount to the cent (as WooCommerce taxed them), the exempt breakdown is written when an allowance at 0% exists (BR-E-01), and amount-only credit notes use the synthesized line as basis. Verified by 17 unit tests and a local fuzz of 27 000 orders and 8 000 refunds against the EN 16931 arithmetic rules.
  - Documents already issued with a coupon keep their file; regenerate them from the order (same number) if your Plateforme Agréée refuses them.
* Fixed: the SIREN/SIRET check at checkout no longer blocks the order, and only applies to French billing addresses.
  - A wrong length (8 digits, for example) was a blocking error although the fields are optional, so a customer abroad typing a national company number could not pay. Length and check digit are now notices ("the order can still be placed"), ignored when the billing country is not FR. The block checkout never had this check.
  - Block checkout: the B2B values are read from the billing fields with the shipping fields as a fallback, because WooCommerce shows address fields in both address forms.
* Improved: short orders fit on a one-page invoice.
  - Invoice and credit note templates: 15 mm page margins, tighter line height, spacing and cell padding, and no page break inside the payment block (invoices) or the legal mentions. The legal mentions of a short order no longer spill on a second page.
* Fixed: download links work again after deactivating and reactivating the plugin, and without pretty permalinks.
  - The rewrite rules of /wfx-invoice/ and /wfx-credit-note/ are registered before the activation flush, which used to drop them until the next permalink save (404 error). With plain permalinks the links carry the same signed token as query variables instead of a rewritten URL.
* Improved: file paths survive a migration or a restore, invoice file names (XML files included) can no longer be guessed, temporary files are named randomly and purged.
  - Paths are stored relative to the uploads folder ("wfx-invoices/2026/10/..."). Absolute paths stored by earlier versions are still read; when such a file is no longer there (site moved), it is looked up again under this site's uploads folder and the stored path is rewritten in the relative form.
  - File names carry a 24-character secret suffix (HMAC-SHA256 keyed with the site salt) instead of 8 characters for new PDFs; new XML files (CII, UBL) get the same suffix, they had none. Regenerating a document keeps its number and deletes its previous file.
  - The intermediate PDF is named randomly and deleted whether the merge succeeds or fails; any tmp-*.pdf older than an hour is purged, on every plan.
* Improved: "File missing" flag in the orders list (with a Regenerate link) and an admin notice; clear messages when the PHP GD extension or memory is missing.
  - A numbered document whose file is gone (generation interrupted after the number was taken, files lost) shows "File missing" and a "Regenerate" link in the orders list instead of a link to a 404 page, and the "missing invoice" flag is raised for it. A dismissible admin notice (hidden for 30 days) counts such documents, on every plan.
  - The PHP memory limit is raised to the administration value before a PDF is built (AJAX requests and the e-mail flow do not get it from WordPress). The GD extension, needed only for a PNG logo or the SEPA QR code, is checked before any number is taken, and the raw GD and "Allowed memory" errors are replaced by what to ask your host (enable GD, raise memory_limit to 256M).
* New: a notice when your Pro plan is no longer active while a Plateforme Agréée connector is selected.
  - Without it, transmissions stop silently when the license expires. The notice (dismissible for 30 days) links to the license page of your Freemius account.
* Fixed: translations load on WordPress 6.4 to 6.7.
  - WordPress 6.8 and later load the translations of the Domain Path on their own; 6.4 to 6.7 did not and no language pack exists yet, so the admin stayed in English. An explicit load_plugin_textdomain() call on init covers those versions and network activations. Plugin Check reports a warning for it, which is expected.
* The free version from WordPress.org now contains only the free features; after buying Pro, install the premium version from your Freemius account (existing customers: once).
* Also in this version:
  - Freemius deactivation form (installs that opted in): two extra reasons, "I expected invoices to be created automatically" and "I did not understand how to generate the first invoice", each with a text field.
  - The "Invoice" column of the orders list and of My Account is now called "GoFactoX".
  - The Plateforme Agréée fields of the settings, disabled on the free plan, are no longer posted when the settings are saved: WooCommerce used to store "no" for their checkboxes, and the transmission was found switched off after buying Pro.
  - The Output Format labels of the settings are translatable. Admin messages that said "Factur-X for WooCommerce" now say "GoFactoX", the description in the plugin header was reworded, and the diagnostic reports the plan as "free" (it said "starter").
  - Uninstall also removes the options and user settings of the checklist, the review invitation and the dismissible notices.
  - Dev: new unit tests (VAT rates, discounts, file paths, download links, notices, checklist, review invitation, PDF layout, free dashboard page) and updated smoke tests.

== 1.6.1 ==

* Updated Freemius SDK to the latest version.
* Settings: the help of "Late Payment Interest Rate" now says what invoices state when the field is empty, the legal default rate (ECB reference rate increased by 10 percentage points). Invoices are unchanged.
* The Freemius opt-in screen shows the GoFactoX icon.
* Tested with WooCommerce 11.2.

== 1.6.0 ==

**Read before updating**

* Pro: check your SUPER PDP client secret. In 1.5.x, saving the settings page without typing the secret again erased it and stopped the transmissions (fixed in this version). After updating, open WooCommerce > Settings > GoFactoX (Factur-X), check that the secret is shown as saved (enter it again if not) and click "Test connection". Documents issued while the secret was missing were not sent: in the GoFactoX dashboard, choose the "Never sent" filter, then "Send these documents to the PA".
* Nothing is generated, and no invoice number is consumed, while the company information is incomplete or the invoices folder cannot be written. Complete the company settings after updating: until then new orders get no invoice, an automatic generation adds an order note with the reason, and an admin notice lists what is missing (all plans). The SIRET is now required only for sellers established in France.
* New "Invoice language" setting. Invoices and credit notes are written in French on new installations and on French sites, and in the site language on an existing installation on a non-French site, so that nothing changes silently: choose French if you invoice customers established in France. The language no longer depends on who triggers the generation.
* GoFactoX admin notices now appear only where they matter: the Plugins page, the orders list, the GoFactoX dashboard and the GoFactoX settings tab, no longer on every admin screen.

**Fixes**

* (Pro) With WooCommerce's default synchronous e-mails, the "Completed order" (or "Processing order") e-mail was sent before the invoice was generated, so the invoice was never attached; refund e-mails had the same problem and did not carry credit notes. The missing document is now generated just before the e-mail, only while the order changes to the trigger status or the refund is created (an e-mail sent again later never creates an invoice), and it is transmitted to your Plateforme Agréée in the background.
* The "UBL" output format now produces a real UBL 2.1 document (Invoice, or CreditNote for credit notes) that passes the French e-invoicing rules; until now it produced CII. The conversion uses horstoeko/zugferdublbridge, by the author of the Factur-X library already used.
* CII and UBL documents are downloaded and attached as .xml files, and their buttons say "XML".
* (Pro) The stored SUPER PDP secret is no longer erased when the settings page is saved without retyping it: WooCommerce no longer saves the secret fields itself, and the typed secret is never stored in clear text, even briefly. Client secrets are stored verbatim (characters such as "<" or "%" were altered).
* (Pro) Status polling could stop refreshing new documents. Documents that reached a final status (paid, approved) or stayed at an intermediate one kept the 20 slots of each polling pass, so after about twenty such invoices the status of newer invoices was no longer updated. Finished documents now leave the polling queue, the others are checked in rotation, and documents transmitted more than 90 days ago get one last check.
* (Pro) The "paid" status (fr:212) is still sent when the invoice reaches an approval status before the Plateforme Agréée accepts it, and it is never sent from a staging or cloned site by the status polling.
* (Pro) Documents whose automatic retries were exhausted no longer prevent other documents in error from being retried.
* (Pro) Each document is tracked through the connector that transmitted it, so switching connectors no longer marks documents in progress as coming from a previous account.
* (Pro) The GoFactoX bulk actions of the orders list require the "manage WooCommerce" capability, like every other GoFactoX action.

**New: Plateforme Agréée (Pro)**

* Experimental "AFNOR API" connector for another Plateforme Agréée exposing the standard AFNOR XP Z12-013 Flow API with OAuth2 client credentials. Listed as "Experimental" in the connector choice; define GOFACTOX_ENABLE_AFNOR as false to hide it. It transmits invoices and credit notes to French business customers and follows them until the platform's technical acknowledgement; business statuses, e-reporting and the "paid" status stay on the platform. Validated with SUPER PDP only. HTTPS only, no redirect followed, the secret is revoked when the platform host changes, a document already held by the platform is compared with the local file before being tracked, and a transmission left without answer is looked up before any new upload.
* "Never sent" filter in the GoFactoX dashboard with a button to send the listed documents, and a "Send to PA" bulk action on the orders list. Sending runs in the background and follows the usual scope; documents already held by the platform or rejected are left alone.
* The order screen and an admin notice explain why transmission is unavailable (no connector, incomplete credentials, staging or cloned site). "Test connection" warns when the SUPER PDP account belongs to a different SIREN than the one on your invoices.

**New for every plan**

* "Preview an invoice" button in the company settings: a watermarked specimen PDF with sample data that consumes no invoice number.
* Orders list: a "Generate" link for processing and completed orders without an invoice, a "Generate the Factur-X invoice" order action, and a "GoFactoX invoice or credit note number" choice in the order search.
* Order notes when an invoice is generated and when a generation fails, with the reason.
* The seller VAT number is checked when the settings are saved: a wrong length for its country, or a French number that is not FR + key + 9 digits, is refused (the previous value is kept); a missing prefix, "GR" instead of "EL", or a French key that does not derive from the SIRET only raises a warning (normal for a VAT group or a fiscal representative).
* "Settings" link on the Plugins page. The diagnostic now checks the invoices folder, PHP limits and extensions, the documents without a file, and whether the folder can be downloaded from the web. A notice appears when the invoices folder cannot be written.
* Deleting the plugin removes the Plateforme Agréée credentials, cached tokens and scheduled events. Invoices, credit notes, settings and numbering counters are kept: invoices must be archived for 10 years and a reinstall must never reuse an invoice number.

**New and improved (Pro)**

* Credit notes are attached to the refund e-mails and listed in My Account, in the orders table and on the order page.
* The dashboard shows the net revenue excl. VAT (invoices minus credit notes) of the month and in total, and a paginated document list. A button such as "Download September 2026 (ZIP)" gives every invoice and credit note of the month with a summary file for your accountant.
* "Generate missing invoices" panel: asks for a start date, shows exactly what will be generated (invoices dated today, numbered in order-date order), also creates the missing credit notes of their refunds, runs in batches, never transmits unless you tick the box, and lists the documents that received a number without a file (interrupted generation).
* The invoice column of the orders list also shows the credit notes of each order and the Plateforme Agréée status of every document, and flags "Missing" the orders that should have been invoiced automatically. Order notes record each Plateforme Agréée status change (sent, accepted, rejected, error).
* The bulk "Generate" action reports the generated, already invoiced and failed orders with the first reason, and rebuilds at the same number the invoices whose file is missing.

== 1.5.1 ==

* Fix: fatal error on PHP 8.0 (a PHP 8.1 keyword slipped into 1.5.0). The plugin runs on PHP 8.0 to 8.5 again.
* Fix: invoice and credit note numbers are now reserved with an atomic database increment, and document creation is locked per order, so two simultaneous triggers (payment gateway notification + status change, bulk + webhook) can no longer produce duplicate numbers or duplicate documents.
* Fix: "Regenerate" keeps the document and its number and rebuilds the PDF/XML in place; it is refused, with an explanation, once the document has been transmitted to the Plateforme Agréée (issue a credit note instead). A confirmation is asked before regenerating.
* Fix: guest customers (no account) can download their invoice from the signed link on the thank-you page and in e-mails; they used to get a 403.
* Security: updated dompdf (3.1.6), FPDI (2.6.8), symfony/yaml and horstoeko/zugferd (1.0.132); `composer audit` is clean.
* Compliance: EU business customers identified by an intra-community VAT number are now invoiced with reverse charge (category AE, VATEX-EU-AE) and transmitted as B2B; exports outside the EU carry the VATEX-EU-G exemption; negative fees keep a consistent VAT rate; the delivery address (BG-15) is emitted when address line 2 or the company differs; credit notes carry their reason as a coded note; the early payment discount mention (AAB) is configurable.
* New (Pro): e-mail alert when a document is rejected by the Plateforme Agréée or fails to be transmitted (one per document), persistent admin notice while documents are in error, "Failed" filter in the dashboard, "Copy diagnostic" button for support.
* New (Pro): transmission is paused on staging/development sites and on cloned sites (URL changed), documents transmitted with a previous PA account are flagged, an unreadable client secret (site keys changed) is reported instead of silently failing.
* Improved: SIRET and IBAN are validated (Luhn, mod 97) in the settings, SIREN/SIRET typed at checkout get a notice when the check digit is wrong, the next invoice number can no longer be lowered below numbers already issued.
* Improved: status polling is locked against overlapping runs and processes 20 documents per pass; "paid" (fr:212) is now a terminal status; temporary files are purged daily; a notice appears when WP-Cron is disabled and no status check ran for two hours.
* Improved: dashboard statistics come from one aggregated query (cached 5 minutes), FEC export reads documents in pages of 500, ZIP export is capped at 200 orders per action, spreadsheet formulas are neutralised in FEC text cells, invoice folder protected with Require all denied (Apache 2.4).
* Improved: settings and menus renamed "GoFactoX (Factur-X)", late payment section renamed, backup reminder, B2C e-reporting hint on the transmission scope, French translations completed.
* Dev: unit tests for numbering, downloads, identifiers, alerts, polling locks, staging guard; GitHub Actions matrix PHP 8.0/8.2/8.4; release build refuses vulnerable dependencies and PHP 8.1 syntax.

== 1.5.0 ==

* New (Pro): automatic transmission of invoices and credit notes to your Plateforme Agréée through your own SUPER PDP account, with status tracking, retries and "paid" status.
* Compliance: SIRET and SIREN identifiers, 0225 electronic addresses, invoicing framework codes B1/S1/M1 and coded legal notes now pass the French PA validation; EN 16931 is the default profile.
* Improved (Business): FEC export with VAT split per rate and a stable entry number.

== 1.4.2 ==

* New: the mandatory mentions of the French reform: operation category (goods, services, mixed), delivery address, optional "VAT on debits" mention, and the invoicing framework (BT-23).

== 1.4.1 ==

* WordPress 7.0 compatibility and zero Plugin Check errors.
* Fixes: credit note download from the dashboard, French translations, end-of-month payment terms aligned with the Code de commerce (L441-10).

== 1.4.0 ==

* New: company logo, IBAN/BIC and payment terms, SEPA QR code, purchase order number at checkout, B2B fields in the block checkout, coupons as structured discounts.
* New: electronic addresses (BT-34/BT-49), Comfort (EN 16931) profile, WooCommerce Subscriptions billing period.
* New: FEC export, REST API and webhooks, GDPR export and erase, developer filters, invoice button on the order confirmation page.

== 1.3.0 ==

* New: Factur-X credit notes (avoirs) for WooCommerce refunds, with their own numbering, "AVOIR" watermark and automatic generation (Pro).
* Improved: clear error messages when the company information is incomplete.

== 1.2.1 ==

* Fix: permission error during plugin registration on some installations.
* Improved: B2B checkout fields shown higher in the checkout form.

== 1.2.0 ==

* New: Pro plan with automation features.
* Improved: WooCommerce 10 compatibility.

== 1.1.1 ==

* New: French translation, WPML, Polylang and LearnDash compatibility, cleaner invoice layout.

== 1.1.0 ==

* Renamed to GoFactoX E-Invoicing for WooCommerce, library updates and coding standards improvements.

== 1.0.0 ==

* First release: Factur-X, CII and UBL invoices from WooCommerce orders, French legal mentions, B2B checkout fields, sequential numbering.
