=== Peppol e-Invoicing Integration by SendPol ===
Contributors: SendPol
Tags: peppol, woocommerce, ubl
Requires at least: 5.9
Tested up to: 7.0
Stable tag: 1.2.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your WooCommerce store to Peppol effortlessly: send UBL invoices automatically with a plugin and API for any organization. Start for free.

== Description ==

SendPol makes life much easier for WooCommerce merchants by automating the connection with the **Peppol network**.  
With this plugin you streamline invoicing workflows: orders are converted into UBL invoices and sent through Peppol automatically, without manual effort.

=== Key features ===

- Deep **WooCommerce integration**: detect orders and turn them into invoices automatically.  
- Generate UBL (Universal Business Language) invoices compatible with governments and corporate buyers.  
- Deliver each invoice via Peppol for standardized, compliant e-invoicing.  
- Supports external invoice PDFs from popular plugins like **PDF Invoices & Packing Slips for WooCommerce** and **YITH WooCommerce PDF Invoices & Packing Slips**.  

=== Supported plugins ===

- Custom Order Statuses for WooCommerce: https://wordpress.org/plugins/custom-order-statuses-woocommerce/  
- Advanced Custom Order Status for WooCommerce: https://wordpress.org/plugins/advanced-custom-order-status-for-woocommerce/  
- BP Custom Order Status for WooCommerce: https://wordpress.org/plugins/bp-custom-order-status-for-woocommerce/  
- PDF Invoices & Packing Slips for WooCommerce: https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/  
- YITH Essential Kit for WooCommerce: https://wordpress.org/plugins/yith-essential-kit-for-woocommerce-1/  
- YITH WooCommerce PDF Invoices & Packing Slips Premium: https://yithemes.com/themes/plugins/yith-woocommerce-pdf-invoice/?utm_source=sendpol&utm_medium=yith-woocommerce-pdf-invoice&utm_campaign=sendpol  

=== Why choose SendPol? ===

From 2026 onward, Peppol e-invoicing becomes mandatory in more European countries, especially for enterprises and public-sector contracts. SendPol keeps you compliant without complex setups or large development costs.

=== How does it work? ===

1. Install and activate the plugin in your WordPress/WooCommerce environment.  
2. Configure your Peppol settings (provide your API key).  
3. Each completed WooCommerce order automatically becomes a UBL invoice.  
4. The invoice is sent through Peppol to the recipient with all required metadata (customer details, VAT number, and more).

=== Who is this plugin for? ===

- Stores that invoice businesses and/or governments.  
- Companies in countries where Peppol is increasingly required or widely adopted.  
- Teams that want to reduce administrative overhead and automate invoicing.  

=== Use cases ===

- B2B customers: send UBL invoices automatically to corporate clients.  
- Public-sector sales: meet invoicing requirements for government contracts.  
- Custom integrations: connect through the API to your ERP or back-office system.

=== Sign up ===
Get started for free via [SendPol](https://www.sendpol.com/en/?utm_source=plugin&utm_medium=wordpress&utm_campaign=registration "Connect your WooCommerce store to Peppol effortlessly"). No credit card required.

== Screenshots ==

1. Dashboard

== Changelog ==

= 1.2.2 =
* Fixed credit notes for amount-only refunds (no quantity selected): the credit-note line no longer emits a credited quantity of 0, which produced invalid Peppol UBL (BR-CO-10). The unit price is now derived from the refunded net amount so price × quantity always reconciles with the line amount.
* Avoid a WooCommerce "doing it wrong" notice by no longer reading the internal `_billing_email` meta key directly.
* Debug logging no longer writes a `sendpol_debug.log` file inside the plugin folder; diagnostics now go to the plugin's Logs page and the WooCommerce logs, so no customer data is ever written to a deployable file.

= 1.2.2 =
* Added support for BLOCKED_DOCUMENT_LIMIT_REACHED and BLOCKED_KYC_PENDING statuses
* Added X-Sendpol-Plugin and X-Sendpol-Plugin-Version identification headers to all outbound API requests
* Added is_blocked and blocking_reason fields from polling response saved as order meta
* Blocking reason now takes priority over status in order column and detail view when is_blocked is true
* Added upgrade CTA button for BLOCKED_DOCUMENT_LIMIT_REACHED status
* Added KYC CTA button for BLOCKED_KYC_PENDING status

= 1.0 =
* Initial plugin release
