=== STS Order Documents for WooCommerce ===
Contributors: piotrprach
Tags: woocommerce, invoice, pdf, packing slip, orders
Requires at least: 6.5
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

Real Unicode PDF invoices and packing slips with frozen invoice data, order currency and protected downloads.

== Description ==

* Real A4 PDF invoices and packing slips, generated locally with an embedded DejaVu Sans font.
* English and Polish document labels and tested Polish text rendering.
* Seller name, address, tax ID, footer, invoice prefix and buyer tax meta field.
* Immutable invoice snapshot of seller, buyer, items, currency and totals at first issuance.
* Unique PREFIX-YEAR-ORDER_ID numbering; repeated downloads preserve the same number.
* Owner-checked invoice downloads for signed-in customers; administrator packing-slip downloads.
* Uses WooCommerce CRUD and supports HPOS; integrates with WooCommerce personal-data export and erasure.

Settings: WooCommerce > STS Documents.

Optional paid add-on: https://simpletradesolutions.com/sts-order-documents-pro-en/

The standalone Free plugin remains useful without an account, licence or subscription. No analytics, telemetry or remote code is loaded.

= Privacy and external services =

Invoice snapshots contain billing/shipping details and are stored as private WooCommerce order metadata. The Free plugin generates PDFs in memory and makes no external service requests. No personal-data logs are written.

= Scope of version 1.0 =

* Not a certified accounting system; no KSeF/Peppol submission, corrective invoices or gapless number sequence.
* Single sober text template, no logo designer or arbitrary HTML templates.
* Embedded font covers Polish/English and supported BMP glyphs; complex-script shaping, CJK and emoji are not supported.
* Guest customers receive PDFs through enabled Pro transactional attachments; self-service downloads require a signed-in owner.
* Snapshots follow the WooCommerce order lifetime and are erased when its personal-data erasure hook runs; no automatic financial-record retention policy is imposed.
* No migration of competitor invoice numbering or historical document records.

== Installation ==

1. Install and activate WooCommerce 9.0 or newer.
2. Upload the sts-order-documents folder to wp-content/plugins, or install the ZIP through Plugins > Add New.
3. Activate the plugin and open WooCommerce > STS Documents.
4. Configure the store-specific fields and test with an order before adopting a live workflow.

== Frequently Asked Questions ==

= Are invoice numbers sequential? =
They use PREFIX-YEAR-ORDER_ID, for example INV-2026-123. This is a unique identifier, not a gapless accounting sequence. Check the required document format for your business.

= What happens after an order changes? =
An issued invoice preserves its original snapshot. Packing slips use current order details. Version 1.0 does not create corrective invoices or edit already-issued snapshots.

= Does it support Polish text? =
Yes. The bundled, locally licensed DejaVu Sans font is embedded in each PDF. Polish diacritics, GBP and EUR glyphs were verified with extraction and visual rendering. Unsupported scripts are not advertised.

= Where can customers get an invoice? =
Signed-in owners can download an already-issued invoice from their order details. Guessing another order ID does not grant access. Guest accounts have no unauthenticated download endpoint.

= Does it support KSeF? =
No. This release produces ordinary PDF documents only. It does not submit e-invoices or replace a country-specific accounting integration.

= What happens when I deactivate or uninstall? =

Deactivation stops this plugin's scheduled work where applicable. Settings are retained by default. Enable the removal checkbox before uninstalling if you want settings removed. Core WooCommerce orders and products are never deleted. Invoice and parcel records remain with the order unless WooCommerce's personal-data erasure removes them. Export files can be deleted in the admin and expire while the plugin is active.

== Changelog ==

= 1.0.0 =
* First original STS release with English/Polish interfaces, HPOS order access and focused workflows.

== Upgrade Notice ==

= 1.0.0 =
Initial release. Review the documented workflow and limitations before use.
