=== Agrunert E-Rechnung for ZUGFeRD ===
Contributors: agrunert
Tags: zugferd, e-rechnung, factur-x, xrechnung, woocommerce
Requires at least: 6.0
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

Automated electronic invoice generation (ZUGFeRD 2.2 / Factur-X PDF/A-3 according to EN 16931) for WooCommerce orders to assist with e-invoicing compliance.

== Description ==

Starting in 2025/2026, electronic invoicing (**E-Rechnung**) is mandatory for B2B transactions in Germany under the Growth Opportunities Act (Wachstumschancengesetz) and across the European Union. Standard PDFs alone are no longer legally compliant for B2B transactions!

**Agrunert E-Rechnung for ZUGFeRD** assists store owners in meeting electronic invoicing requirements directly from WooCommerce:

* **Standard-Compliant E-Invoicing:** Generates hybrid PDF/A-3 documents with embedded Factur-X / ZUGFeRD 2.2 XML according to European standard **EN 16931** to assist your invoicing workflow.
* **Fully Automated:** Invoices are automatically generated in the background when an order is marked as "Completed" and attached to the customer email.
* **Zero Infrastructure Overhead:** No complicated XML libraries or server extensions required on your WordPress host. Invoices are generated via our secure, high-performance REST API hosted in Frankfurt am Main, Germany (`fra`).
* **Free Developer Test Mode:** Test invoice generation risk-free without consuming paid credits (invoices are watermarked for testing).
* **Fair Prepaid Pricing (No Subscription Required):** 100 invoices for 10 € (0.10 € per invoice) without monthly contract lock-in.

== Installation ==

1. Download the plugin `.zip` file.
2. In your WordPress admin dashboard, go to **Plugins > Add New Plugin > Upload Plugin** and select the `.zip` file.
3. Click **Install Now** and then **Activate**.
4. Navigate to **WooCommerce > E-Rechnung (ZUGFeRD)** in the admin menu.
5. Enter your API Key (or keep Developer Test Mode active) and fill in your seller business details (Company name, address, VAT ID, IBAN).
6. That's it! ZUGFeRD invoices are now automatically generated for completed orders.

== Frequently Asked Questions ==

= What is ZUGFeRD / Factur-X? =
ZUGFeRD (Factur-X) is the official Franco-German and European standard for electronic invoices. It combines a human-readable PDF with a machine-readable XML dataset (EN 16931). Humans can view it normally in any PDF reader, while accounting software can ingest it automatically.

= Is customer data stored permanently on external servers? =
No. The API operates in 100% volatile memory (RAM-only stateless processing). Invoice data is discarded immediately after the PDF/A-3 document is generated and is stored exclusively on your own WordPress installation.

= How much does it cost? =
The plugin is completely free to test using our test key. For production use, a fair prepaid package is available: 100 invoices for 10 € (10 cents per invoice) with no subscription required. High-volume monthly plans are also available.

= Legal Disclaimer / Compliance Notice =
This plugin and the connected web service assist store owners technically with the generation of electronic invoices formatted to ZUGFeRD 2.2 and EN 16931 specifications. The software does not provide legal or tax advice. Legal and fiscal accuracy of the invoice contents remains the sole responsibility of the merchant.

== External Service Disclosure ==

This plugin relies on an external cloud service (E-Rechnung REST API) to generate EN 16931 PDF/A-3 hybrid electronic invoices:

* **Service Endpoint:** https://e-rechnung-api.fly.dev/v1/invoice/generate
* **Data Transmitted:** Invoice metadata (invoice number, buyer and seller billing addresses, order line items, tax rates) required to render the standardized PDF/A-3 and Factur-X XML files.
* **Data Retention:** 100% volatile memory only (Stateless RAM processing; no invoice or customer data is permanently stored on external servers).
* **Terms of Service:** https://e-rechnung-api.fly.dev/agb
* **Privacy Policy:** https://e-rechnung-api.fly.dev/datenschutz

== Changelog ==

= 1.0.0 =
* Initial release: Automated ZUGFeRD 2.2 PDF/A-3 generation for WooCommerce.
* High-Performance Order Storage (HPOS) compatibility declared.
* Manual invoice generation and download buttons in WooCommerce order details.
* Automatic attachment to customer order completion emails.
