=== Factur-X for WooCommerce ===
Contributors: novairapp
Tags: factur-x, e-invoicing, woocommerce, invoice, zugferd
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn a WooCommerce order into a valid Factur-X e-invoice XML in one click. Mandatory fields checked. 100% local, no fees.

== Description ==

= Your customer asks for an electronic invoice. Your order is already in WooCommerce. Why are you retyping it? =

Since 1 September 2026 every French business must be able to receive electronic invoices. Issuing them
becomes mandatory for small businesses on 1 September 2027. Public buyers (Chorus Pro) and many large
customers already require the format today - and they reject files that miss a single mandatory field.

Factur-X for WooCommerce turns any order into a valid Factur-X invoice file (CII UN/CEFACT D16B XML,
the same syntax as ZUGFeRD 2.x) from the order screen. One click. No retyping, no second tool, no
subscription to an invoicing platform.

= What you get =

* **One click, one valid file.** Open an order, click "Generate Factur-X", download the XML. Line items,
shipping, fees, coupons, VAT breakdown and payment data are mapped for you.
* **Checked before you send.** 30+ EN 16931 business rules (BR-02 to BR-25, BR-CO-10/13/15/16/17, VAT
category rules) plus the French mandatory mentions: SIREN with checksum, VAT number key, due date,
late-payment penalties, the 40 EUR recovery indemnity. Every error is explained in plain language with
the rule that failed - not an XSD stack trace.
* **100% local.** This plugin never makes a network call. Your invoices, your customer names and your
revenue stay on your own server. Nothing to sign up for, no per-invoice fee, no data processor to add
to your privacy policy.
* **It fits the plugins you already run.** If PDF Invoices & Packing Slips already numbered the order,
the same number is reused - one sale, one invoice number. HPOS (High-Performance Order Storage)
compatible.
* **English and French** interface and error messages, out of the box.

= You stay in control of sending =

This plugin generates and validates. It does not transmit anything to a PDP, to Peppol or to Chorus Pro.
You download the file and send it the way you already do - by email, by portal upload, or to your
accountant. That is a deliberate choice: no variable cost for you, no third party in the middle of your
invoicing.

= Who it is for =

* French shops that already receive "send me a Factur-X invoice" emails from B2B customers.
* Shops selling to the public sector, where Chorus Pro has required structured invoices since 2020.
* Accountants who would rather import a batch than retype 80 orders a month.

= What this plugin does, in full =

* Factur-X BASIC profile, one order at a time.
* Validation of the EN 16931 business rules and of the French mandatory mentions.
* Single XML download from the order screen.
* Complete seller settings: legal identity, SIREN, VAT number, address, VAT regime, invoice numbering,
payment terms.

There is a separate paid add-on plugin, Factur-X for WooCommerce Pro, sold on our own site for shops
that need the EN 16931 profile, batch export of a whole month as ZIP + CSV for their accountant, and an
exportable validation report. It is a distinct plugin: this free plugin stays complete on its own and
keeps working exactly the same whether or not the add-on is installed. Details:
https://wc-facturx.novair.app

== Installation ==

1. Install and activate WooCommerce 8.0 or later.
2. Upload the plugin through Plugins > Add New > Upload Plugin, or install it from the WordPress
plugin directory, then activate it.
3. Open WooCommerce > Factur-X and fill in your legal identity: company name, SIREN, VAT number,
address, VAT regime. These are the mentions French law requires on an invoice; the plugin checks them
for you.
4. Open any order. The "Factur-X" box on the right shows the check result and a "Generate Factur-X"
button that downloads the XML file.

No account, no API key, no configuration file to edit.

== Frequently Asked Questions ==

= Does this make me compliant with the 1 September 2026 deadline? =

The 2026 date is about receiving electronic invoices - that applies to every French business already.
Issuing them becomes mandatory for small businesses on 1 September 2027. This plugin is about issuing:
it lets you produce compliant invoices today, for the customers who already ask for them, and be ready
well before 2027. It does not turn your shop into a certified platform (PDP).

= Does it send invoices to Chorus Pro or to a PDP? =

No. It generates and validates the file; you send it. No account, no per-invoice fee, no third party.

= Do I need a PDF invoice plugin? =

No. If you already use PDF Invoices & Packing Slips, the invoice number of that plugin is reused so both
documents match. If you do not, the plugin uses the order number with your own prefix.

= Which profile does it generate? =

BASIC. The XML is CII UN/CEFACT D16B - the same syntax as ZUGFeRD 2.x, so German customers accept it
too. The EN 16931 profile is part of the separate Pro add-on.

= Does it work without an internet connection? =

Yes, entirely. This plugin never calls out.

= Does it support VAT exemptions? =

Yes: franchise en base (art. 293 B CGI), intra-EU B2B reverse charge, exports outside the EU, and
zero-rated lines each get the right EN 16931 VAT category and the matching legal wording.

= Does it work with HPOS? =

Yes. The plugin declares compatibility with High-Performance Order Storage and reads orders through the
WooCommerce CRUD API, so it works with the legacy post storage as well.

== Screenshots ==

1. One click on the order screen - no retyping.
2. Every mandatory field checked: SIREN, VAT, due date, late-payment terms.
3. Errors in plain language, with the rule that failed.
4. Seller settings, filled once.

== External services ==

This plugin does not use any external service. It makes no network request of any kind: no analytics,
no update check of its own, no remote validation, no transmission of invoices. Every file is built and
checked on your own server, and nothing about your orders, your customers or your revenue leaves it.

The separate Pro add-on is a different plugin, not distributed here. If you choose to install it, it
calls the Gumroad licence API (api.gumroad.com, Gumroad, Inc.) when you submit a licence key, and sends
only that key and your site domain, so that the subscription can be checked. Gumroad terms:
https://gumroad.com/terms - Gumroad privacy policy: https://gumroad.com/privacy. That add-on is not part
of this plugin and this plugin works fully without it.

== Privacy ==

This plugin stores your seller settings in the WordPress options table and reads WooCommerce orders when
you ask for an invoice file. It creates no additional table, sets no cookie, and sends no data anywhere.

== Changelog ==

= 1.0.0 =
* First release: Factur-X BASIC generation from a WooCommerce order, EN 16931 and French
mandatory-mention validation, seller settings, HPOS support, English and French.
