Invoice system
Polski PRO issues VAT invoices, proformas and correction invoices as PDF files directly from WooCommerce orders. An invoice can be generated by hand from the order screen or automatically when an order reaches a chosen status (Completed by default), numbered from a configurable mask, e-mailed with WooCommerce emails and downloaded by the customer in My Account.
Document types
Section titled "Document types"| Type | Value | Number prefix | How it is created |
|---|---|---|---|
| VAT invoice | faktura_vat |
FV | Order screen, automatic issue, Add new, REST |
| Proforma invoice | proforma |
PF | Order screen, Add new, REST |
| Corrective invoice | korygujaca |
FK | From a WooCommerce refund (KSeF box on the order, REST), or without a refund with Correct (invoice list, KSeF box on the order, REST) |
| Paragon | paragon |
PA | REST (type parameter) |
| Packing Slip | packing_slip |
WZ | REST (type parameter) |
An invoice issued from an order stores the seller and buyer NIP, buyer name (billing company, or first and last name), billing address, line items, net, VAT and gross totals, currency and the date of supply.
A correction is built from the refunded lines of a refund (products, shipping or fees). A refund entered as an amount only, with no lines, cannot produce a correction, and the VAT invoice for the order has to exist first. An order that contains only gift cards gets no invoice.
Since 1.35.0 a VAT invoice with a KSeF number can also be corrected without a refund: a VAT rate at the same gross, the buyer details, line names, the date of supply, or a price or quantity. The form previews the difference before the correction is issued, and its PDF shows the lines before and after the correction. See KSeF integration: corrections for the rules.
Configuration
Section titled "Configuration"Go to Polski > Settings > Invoices. The issued documents are listed under Polski > Invoices. Settings are stored in the polski_pro_invoices option.
Issuing
Section titled "Issuing"| Setting | Key | Notes |
|---|---|---|
| Auto-generate invoice on order status | auto_generate |
Off until enabled |
| Trigger statuses | auto_generate_statuses |
Comma-separated, completed when empty |
| Only issue when the customer requested an invoice | require_invoice_request |
A request is the checkbox, a billing company or a billing NIP |
| Show "I want a VAT invoice" checkbox at checkout | request_field |
Classic and block checkout |
| Skip free (zero-total) orders | skip_free_orders |
Orders paid with a gift card are not treated as free |
| Mark invoices paid when the order is paid | auto_paid |
Stored, but issued invoices are marked paid regardless (see Invoice status) |
Automatic issue never creates a second VAT invoice for the same order.
Seller data and PDF content
Section titled "Seller data and PDF content"| Setting | Key |
|---|---|
| Seller name, NIP, address, postcode, city | seller_name, seller_nip, seller_address, seller_postcode, seller_city |
| Bank name, Bank account (IBAN) | seller_bank_name, seller_bank_account |
| Logo URL | logo_url |
| Payment term (days) | payment_deadline_days |
| Date of supply printed on the invoice | supply_date_source: order date, completed date or payment date (the last two fall back to the order date) |
| Print a ZBP payment QR on unpaid PLN invoices | payment_qr |
| Reverse-charge / OSS note (shown on zero-VAT B2B docs) | reverse_charge_note |
| Print the invoice PDF in the language the customer ordered in (WPML, Polylang) | order_language |
| Footer notes | notes |
Numbering
Section titled "Numbering"| Setting | Key | Default |
|---|---|---|
| Numbering format | numbering_format |
{prefix}/{year}/{month}/{sequence}, for example FV/2026/04/001 |
| Sequence reset | number_reset |
year (options: Yearly, Monthly, Never) |
| Sequence zero-padding (digits) | number_padding |
3 (1 to 10) |
Tokens in the format:
| Token | Value |
|---|---|
{prefix} or {PREFIX} |
Document prefix: FV, PF, FK, PA, WZ |
{year} or {YYYY} |
Four-digit year of issue |
{month} or {MM} |
Two-digit month |
{day} or {DD} |
Two-digit day |
{sequence}, {number} or {NR} |
Sequence number, zero-padded |
Each document type has its own sequence, reset per year, per month or never.
E-mail attachments
Section titled "E-mail attachments"| Setting | Key | Notes |
|---|---|---|
| Attach the invoice PDF to WooCommerce e-mails | email_attach |
|
| E-mail ids to attach to | email_attach_ids |
customer_completed_order,customer_invoice when empty |
Tick Attach the invoice PDF to WooCommerce e-mails under Polski > Settings > Invoices and Polski PRO adds the PDF of every invoice the order already has to the listed WooCommerce e-mails. With the ids field empty, that is customer_completed_order (the Completed order e-mail) and customer_invoice (the order details e-mail you send from the order screen). Any other WooCommerce e-mail id works too, comma-separated, for example customer_processing_order.
The attachment is added only when the PDF file exists; the e-mail itself does not issue an invoice. With Auto-generate invoice on order status on, the invoice for a status is created before WooCommerce sends its e-mail for that same status, so the Completed order e-mail carries the invoice issued on Completed. An e-mail for an earlier status goes without it: with invoices issued on Completed, the Processing order e-mail has no PDF. Attaching does not change the invoice status to Sent; only the Email link on the order does.
PDF generation
Section titled "PDF generation"PDFs are generated with the TCPDF library in A4 format, using the DejaVu Sans font, which covers Polish characters. Files are saved under wp-content/uploads/polski-invoices/{year}/{month}/ and are served through protected download links (a nonce in wp-admin, a signed key in My Account), not by direct URL.
Invoice status
Section titled "Invoice status"| Status | When it is set |
|---|---|
| Draft | Briefly while the document is created |
| Issued | Right after creation, even when the PDF could not be generated |
| Sent | After the invoice is e-mailed with the Email link |
| Paid | When the order is paid (Processing, Completed or payment complete), for VAT invoices and corrections that are Issued |
| Cancelled | Defined, but no screen sets it |
Order screen
Section titled "Order screen"The Invoices box on the order lists every document of the order with number, type, status, a PDF link and an Email link. Its buttons are Generate Invoice and Generate Proforma. Without documents it shows "No invoices generated yet."
The Email link sends the document with wp_mail() in the WooCommerce email template, with the PDF attached, and adds an order note.
Invoices list
Section titled "Invoices list"Polski > Invoices shows documents with number, type, status, buyer NIP, net, gross, issue date and order. You can filter by type and status, see document count and revenue for the last 365 days, download all listed PDFs as a ZIP, and create a manual invoice with Add new (buyer data and lines typed by hand).
My Account
Section titled "My Account"On the customer's order view a section Invoices lists every document that has a PDF, with a Download PDF link. The link carries a signed key, and a logged-in customer cannot open another customer's document.
REST API
Section titled "REST API"All routes are under polski-pro/v1 and need the manage_woocommerce capability.
| Method and route | Description |
|---|---|
GET /invoices |
List; parameters order_id, type, status, page (default 1), per_page (default 20) |
POST /invoices |
Create from an order; order_id required, type default faktura_vat |
GET /invoices/stats |
Statistics for the last days (default 30, 1 to 365) |
GET /invoices/{id} |
One document |
POST /invoices/{id}/pdf |
Regenerate the PDF |
POST /invoices/{id}/correction |
Issue a correction; optional refund_id, otherwise the first refund without a correction |
POST /invoices/{id}/corrections |
Issue a correction without a refund: kind, reason, changes, optional dry_run and send (see PRO REST API) |
POST /invoices/{id}/ksef |
Send to KSeF |
POST /invoices/{id}/ksef/refresh |
Refresh the KSeF status |
GET /invoices/{id}/upo |
KSeF UPO |
Example:
POST /wp-json/polski-pro/v1/invoices{"order_id": 123, "type": "proforma"}| Hook | Type | Arguments |
|---|---|---|
polski/pro/invoice/created |
action | Invoice $invoice (also for corrections and manual invoices) |
polski/pro/invoice/pdf_generated |
action | int $invoiceId, string $filepath |
polski/pro/invoice/sent |
action | Invoice $invoice, string $to |
polski/pro/invoice/exchange_rate |
filter | null, string $currency, $date; return ['rate' => float, 'date' => string] to override the rate |
add_action('polski/pro/invoice/pdf_generated', function (int $invoiceId, string $filepath): void { // Copy the PDF to your archive.}, 10, 2);Common issues
Section titled "Common issues"No PDF link next to the invoice
Section titled "No PDF link next to the invoice"The PDF was not generated. Check that the uploads directory is writable and use POST /invoices/{id}/pdf to regenerate it.
The automatic invoice did not appear
Section titled "The automatic invoice did not appear"Check that Auto-generate invoice on order status is on, that the order reached one of the trigger statuses, and, if Only issue when the customer requested an invoice is on, that the order has the checkbox, a company or a NIP.
No VAT on line items
Section titled "No VAT on line items"The plugin takes VAT rates from WooCommerce tax settings. Make sure the rates are configured for Poland.
Can the invoice be issued automatically?
Section titled "Can the invoice be issued automatically?"Yes. Turn on Auto-generate invoice on order status and list the trigger statuses (Completed when empty). It issues one VAT invoice per order.
How do I issue a correction invoice?
Section titled "How do I issue a correction invoice?"Refund the order line by line in WooCommerce, then use the correction button in the order's KSeF box or POST /invoices/{id}/correction. The VAT invoice must exist first. For a change without a refund (VAT rate, buyer, line name, date of supply, price or quantity), click Correct next to the invoice once it has a KSeF number.
Can the customer download invoices?
Section titled "Can the customer download invoices?"Yes. Each order in My Account lists its documents with a Download PDF link.
Which number format is used by default?
Section titled "Which number format is used by default?"{prefix}/{year}/{month}/{sequence} with three-digit padding and a yearly reset, for example FV/2026/04/001.