=== Wexofy Invoices for WooCommerce ===
Contributors: wexofy
Tags: invoice, pdf invoice, proforma, woocommerce invoice, vat
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 8.0
WC requires at least: 8.0
WC tested up to: 9.9
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatic PDF invoices and proformas for WooCommerce, attached to order e-mails. Sequential numbering, buyer VAT numbers, no external service.

== Description ==

Wexofy Invoices turns every WooCommerce order into a clean, real PDF invoice — generated on your own server, no external service and no "print to PDF".

* **Automatic invoices.** A sequential, gap-free number is assigned and the PDF is generated when the order is Completed or Processing — your choice.
* **Attached to e-mails.** The PDF goes out with the WooCommerce "Completed order" e-mail, and optionally "Processing order" and the admin "New order" e-mail.
* **Customer download.** A download button in My Account → Orders and on the order view. Files are served through a permission-checked link and are not publicly listed.
* **Admin tools.** View, download or regenerate from a box on the order screen, an "Invoice" column in the orders list and a "Create invoices" bulk action.
* **Packing slips.** One click on the order screen: what to pack (left to ship after refunds), SKUs, product options, weights, the shipping address and the customer's note, with a tick box per line.
* **Bulk PDFs.** Select orders and pick "Download invoices (one PDF)" or "Print packing slips (one PDF)" — one file, one document per page.
* **E-invoices (UBL / Peppol).** Optionally make every invoice also as an XML file in the European e-invoice format — UBL 2.1, Peppol BIS Billing 3.0, EN 16931 — attached to the e-mail with the PDF and downloadable from the order screen and My Account. Business customers' accounting software imports it without retyping. Checked against the official Peppol validation rules (2026.5).
* **Long orders done right.** The column headings repeat on every page, rows and totals are never cut in half, and every page is numbered ("INV0042 · 2 / 3").
* **Your numbering.** Series, starting number, leading zeros, a format with {series}, {number} and {year}, and an optional yearly reset.
* **Buyer company details.** The buyer's company number and VAT number are printed when the order has them (the order fields are configurable).
* **Proforma invoices.** Their own numbering series, a due date and a note, created with one button on the order screen.
* **Bank transfer with a proforma.** A "Bank transfer (proforma invoice)" payment method: the order goes on hold, the customer gets a proforma by e-mail, and the bank account, amount and payment reference show on the order-received page. It can also ride on WooCommerce's own bank transfer (BACS).
* **Two designs.** Classic (coloured table header, boxed seller and buyer) or Clean (white, hairlines), your accent colour and logo, with a live preview of a sample invoice next to the settings and a "Preview a sample invoice (PDF)" button.

**Tax**

All amounts come straight from WooCommerce's own tax settings — the plugin never calculates tax, so any number of tax rates works. The tax label is configurable ("VAT", "GST", "Tax", "MwSt."…), and a "registered for tax" switch sets the document title and whether tax columns are shown.

**Language**

The PDF has its own language setting, independent of the admin language. English and Lithuanian are built in; other languages work with a standard translation file.

**Want more?**

[Wexofy Invoices Pro](https://wexofy.com/plugins/wx-invoices/) is a separate add-on that adds four more PDF designs with layout options (text and logo size, Letter paper, a PAID stamp, hidden columns, custom CSS), credit notes for refunds, EU reverse charge with a VIES check, the amount in words, manual invoices for sales outside WooCommerce, a one-file accountant export (PDF + CSV) and bank-statement reconciliation. This free plugin is complete on its own and does not need it.

Wexofy is not affiliated with or endorsed by WooCommerce or Automattic.

== Installation ==

1. Install and activate the plugin (WooCommerce must be active).
2. Open **WooCommerce → Settings → Invoices** and fill in your company details: name, company number, tax number, address and bank account.
3. On the "Document" tab set the number series, and the next number if you are continuing an existing sequence.

== Frequently Asked Questions ==

= Where are the PDF files stored? =

In `wp-content/uploads/wx-invoices/`, behind a deny rule. Downloads go through a permission-checked link.

= Does it work with HPOS? =

Yes, it is compatible with WooCommerce High-Performance Order Storage.

= Can I change the invoice design? =

Pick Classic or Clean under WooCommerce → Settings → Invoices → Document and set your accent colour and logo on the Seller tab. For full control, copy `templates/invoice.php`, `templates/packing-slip.php` or a file from `templates/partials/` into `yourtheme/wexofy-invoices-for-woocommerce/` (same sub-folder). Each template has a version number; when the plugin's copy is newer than yours, the settings screen tells you, so an update never silently breaks a customised invoice.

= What is the e-invoice (UBL / Peppol) and do I need it? =

It is the same invoice as an XML file that accounting software reads by itself. Belgium, Germany, Poland, France and other EU countries are making e-invoices compulsory between businesses, so B2B customers increasingly ask for one. Turn it on under WooCommerce → Settings → Invoices → Generation & emails. Your electronic address is taken from your company code or VAT number (or set a Peppol ID); the buyer's from their company or VAT number. An invoice for a private customer still gets the XML, but uses the e-mail address, which the Peppol network itself does not route. Sending the file over the Peppol network needs a paid access-point provider and is not part of this plugin.

= My logo does not show on the PDF =

The settings screen warns you when the logo cannot be loaded. The plugin reads the image from your own server even when the URL goes through a CDN, http/https or www differ, or it is a resized copy, and turns WebP or AVIF into PNG for the PDF. If the warning stays, pick the logo again from the Media Library.

= Does it support my language's letters? =

The PDF uses DejaVu Sans, which covers Latin (all European languages), Greek and Cyrillic. Scripts such as Arabic, Hebrew, Bengali, Chinese, Japanese or Korean are not covered yet.

= Will it nag me? =

No. There are no banners, ads or review requests on other admin pages. Pro is mentioned in a "More with Pro" tab inside the plugin's settings and a "Get Pro" link in the plugin's row on the Plugins screen, and nowhere else.

= I used the earlier all-in-one "Wexofy Invoices" plugin. Do I lose anything? =

No. Your settings, numbering and every order's invoice are carried over, and the old plugin is switched off. Reverse charge, amount in words, manual invoices, the accountant export and bank reconciliation are part of Wexofy Invoices Pro.

= What happens when I delete the plugin? =

Its settings are removed. Orders, their invoice numbers and the PDF files are kept, because invoices are accounting records.

== Third-party libraries ==

PDFs are rendered with Dompdf 2.0.8 (LGPL-2.1), bundled in `lib/dompdf` together with its dependencies php-font-lib, php-svg-lib and php-css-parser. The DejaVu fonts it ships are under the Bitstream Vera / DejaVu licence.

== Screenshots ==

1. A generated invoice PDF.

== Changelog ==

= 1.1.0 =
* New: e-invoices — each invoice also as UBL 2.1 / Peppol BIS Billing 3.0 XML (EN 16931): attached to the e-mails with the PDF, "E-invoice (XML)" buttons on the order screen and in My Account. Lines after discounts, shipping and fees, VAT categories (standard, zero, reverse charge, not subject to VAT), a fee spread over several VAT rates split per rate, Peppol electronic addresses from the company code or VAT number. Off by default (Settings → Invoices → Generation & emails). Developer: wxinv_ubl_tax_category and wxinv_ubl_document filters.
* New: packing slips — a "Packing slip" button on the order screen: items left to ship after refunds, SKUs, product options, weights, shipping address, customer note and a tick box per line.
* New: bulk actions "Download invoices (one PDF)" and "Print packing slips (one PDF)" in the orders list.
* New: page numbers with the document number on multi-page PDFs; column headings repeat on every page and rows, totals and signatures are no longer cut across pages.
* Fix: the logo now loads behind a CDN or offload plugin, with http/https or www differences, from a resized copy, and in WebP or AVIF (converted to PNG). The settings screen warns when it still cannot be loaded.
* New: theme copies of the templates are checked against the plugin's template versions, with a warning on the settings screen when they are out of date.
* Developer: wxinv_order_box action, wxinv_packing_data, wxinv_page_numbers, wxinv_bulk_pdf_limit and wxinv_textdomains filters; the totals label and payment box can be set per document (used by Pro credit notes).

= 1.0.1 =
* New: choose the PDF design — Classic or Clean — with a live preview of a sample invoice next to the settings that follows unsaved changes, and a sample PDF button.
* Fix: the invoice language setting (e.g. Lithuanian) had no effect when WordPress itself had no language pack for it — the bundled translation is now loaded directly.
* Developer: wxinv_designs, wxinv_design_css, wxinv_doc_options and wxinv_sample_data filters.

= 1.0.0 =
* First release on WordPress.org: automatic PDF invoices, e-mail attachments, customer download, admin tools, configurable numbering, buyer company and VAT numbers, proforma invoices and a bank-transfer payment method with a proforma.
