=== XRechnung 3.0 & EN 16931 E-Invoice for WooCommerce ===
Contributors: radartools
Tags: woocommerce, xrechnung, e-rechnung, en16931, einvoice
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate 100% local EN 16931 / XRechnung 3.0 (UBL 2.1 XML) e-invoices in WooCommerce — zero external API, Leitweg-ID checkout field, HPOS ready.

== Description ==

**XRechnung 3.0 & EN 16931 E-Invoice for WooCommerce** generates compliant German and European B2B/B2G electronic invoices (**XRechnung 3.0 UBL 2.1 XML** and **EN 16931**) 100% locally in PHP on your own WordPress server.

Unlike SaaS e-invoicing connectors, **zero customer or order data ever leaves your server** — no API keys, no per-invoice fees, and full GDPR privacy.

Built for the **German B2B E-Rechnung mandate (2025–2027)** and European Peppol / EN 16931 invoicing.

= Free Features =

* **100% Local XRechnung 3.0 (UBL 2.1 XML) Generator** — one-click download directly from any WooCommerce order screen.
* **EN 16931 / BR-DE-2 Pre-Flight Readiness Check** — validates mandatory seller & buyer fields (BT-27..BT-40, VAT ID, Contact Name/Phone/Email, IBAN) right inside the order meta box.
* **Optional Leitweg-ID / Buyer Reference Checkout Field** — lets B2B & German public-sector (B2G) buyers enter their Leitweg-ID at checkout.
* **Automatic VAT Category Mapping** — supports Standard (`S`), EU B2B Reverse-Charge (`AE`), Non-EU Export (`G`), and Zero-Rated (`Z`).
* **WooCommerce HPOS Compatible** — supports both High-Performance Order Storage (`custom_order_tables`) and legacy order screens.

= Pro Features (Radar Pass) =

Unlock with an optional [Radar Pass](https://radarbg.com/pass?ref=wp-xrechnung):

* **Automatic Email Attachment** — attaches the XRechnung 3.0 XML directly to WooCommerce Completed Order emails.
* **Peppol BIS Billing 3.0 Profile** — download EN 16931 Peppol BIS 3.0 XML for cross-border EU B2B invoicing (BE, NL, FR, IT, PL, etc.).
* **Bulk Monthly ZIP Export** — download all XRechnung XML files for an entire month in one click for your tax advisor.

== External Services ==

This plugin operates 100% locally and makes **zero external HTTP requests** by default.

If (and only if) a store administrator voluntarily enters a Radar Pass Pro code in *WooCommerce → XRechnung E-Invoice*, the plugin sends a single `GET` request to `https://radarbg.com/api/pass/status?code=<pass_code>` once every 12 hours to verify whether the Pass is active. No store, order, invoice, or customer data is ever transmitted.

* Service provider: [Radar Tools (radarbg.com)](https://radarbg.com)
* Privacy Policy: [https://radarbg.com/privacy](https://radarbg.com/privacy)
* Terms of Service: [https://radarbg.com/terms](https://radarbg.com/terms)

== Installation ==

1. Upload `radar-xrechnung-einvoice` to `/wp-content/plugins/` or install via the WordPress Plugins screen.
2. Activate the plugin through the *Plugins* menu in WordPress.
3. Go to **WooCommerce → XRechnung E-Invoice** and fill in your Seller Legal Name, Address, VAT ID / Tax Number, Contact Details, and IBAN.
4. Open any WooCommerce order and click **Download XRechnung 3.0 XML** in the right-hand meta box.

== Frequently Asked Questions ==

= Does this plugin send my invoices to a third-party API? =

No. Every XRechnung 3.0 UBL XML file is generated 100% locally in PHP on your own server.

= Is it compatible with WooCommerce HPOS? =

Yes. It officially declares `custom_order_tables` compatibility and supports both HPOS and legacy order screens.

== Changelog ==

= 1.0.0 =
* Initial release: 100% local XRechnung 3.0 (UBL 2.1 XML) generator, EN 16931 pre-flight checker, optional Leitweg-ID checkout field, Peppol BIS 3.0 & Bulk ZIP export (Pro), HPOS compatibility.
