plugin-icon

Kitgenix PDF Invoicing for WooCommerce

Generate PDF invoices, receipts and packing slips for WooCommerce. Secure Dompdf rendering, template overrides and email attachments.
Versione
1.0.4
Ultimo aggiornamento
Jan 27, 2026
Kitgenix PDF Invoicing for WooCommerce

Most WooCommerce stores eventually need proper order documents.

You might need a PDF invoice for accounting, a receipt for the customer, a packing slip for fulfilment, or a credit note when a refund is issued. You also want those documents to look professional, match your branding, and be reliable across different WooCommerce email flows.

Kitgenix PDF Invoicing for WooCommerce is a lightweight, security-first PDF invoicing plugin that generates WooCommerce order PDFs on demand — without creating heavy background jobs, and without storing piles of PDF files in your uploads folder.

It’s built with real-world store requirements in mind: stable numbering, safe PDF rendering, theme-overridable templates, email attachments that clean up after themselves, and a clean admin workflow for previewing and downloading documents from the order screen.

It is also designed to be modular and developer-friendly, so it can grow with your store and be customised safely.

What this plugin generates

This plugin can generate the following WooCommerce PDF documents:

Invoice (PDF) Receipt (PDF) Packing Slip (PDF) Credit Note (PDF) (when refunds exist)

Each document type is defined in a document registry and can be extended via filters, making it possible to add additional document types later without rewriting the core plugin.

Why store owners choose Kitgenix PDF Invoicing

It’s secure by default. PDF generation uses Dompdf configured with strict defaults. Remote fetching is disabled by default, and Dompdf is chrooted to allowed paths. PHP execution inside templates is disabled by default (opt-in only), and all public/admin actions are protected by capability checks and nonces.

It doesn’t bloat your site. PDFs are generated only when needed. Email attachments are created as temporary files and cleaned up automatically. The plugin avoids unnecessary processing on normal page loads.

It’s built for WooCommerce documents, not generic PDFs. Everything revolves around WooCommerce orders: document numbering, refund-aware credit notes, email attachments, and customer download links in the right places.

It’s modular and extensible. The plugin boots a module set (Invoicing, Frontend, Admin, Email, Settings) and allows developers to alter module registration. Document types, templates, filenames, HTML output and availability can all be filtered.

Features (in more detail)

PDF invoices, receipts, packing slips and credit notes

Generate professional PDF documents per order. Credit note availability is tied to refunds, so credit notes appear when they make sense.

Stable document numbering and history

Invoices and credit notes often need stable numbering. This plugin persists document identifiers (and relevant timestamps) on first generation so the document remains consistent over time. This avoids “invoice number changed after regeneration” issues.

Secure PDF rendering with Dompdf

Dompdf is bundled for convenience, but configured with security in mind: – strict chroot paths – remote resource fetching disabled by default – optional PHP execution (disabled by default; enable only if you understand the risk)

Theme template overrides (developer and agency friendly)

The plugin includes a standard template set and a predictable override system.

Template resolution order: 1. Full override via filter (template path hook) 2. Theme override under: kitgenix-pdf-invoicing-for-woocommerce/standard/ 3. Plugin templates fallback

This makes it easy to brand invoices and adjust layouts without hacking plugin files.

Admin order actions (preview + download)

On the WooCommerce order screen you can: – preview the full document in HTML (useful when designing templates) – download/stream a PDF – generate documents on demand – access credit note actions when refunds exist

All endpoints are secured with nonces and capability checks.

Customer download links (optional)

For stores that want customers to access documents from their account, the plugin can show download buttons in the customer order view (for logged-in customers who own the order). Credit note buttons appear when refunds exist.

Email attachments (configurable)

Attach PDFs to WooCommerce emails using settings and filters.

The plugin hooks WooCommerce’s email attachment pipeline, generates PDFs as temporary files per email, attaches them, and cleans them up automatically at shutdown.

Defaults are sensible and can be changed: – Invoice: Processing + Completed – Receipt: Completed – Credit Note: Refunded – Packing Slip: New Order (admin email)

How it works (simple explanation)

  1. The plugin renders a document template to HTML A standard template is used unless you override it in your theme.

  2. The HTML is wrapped in a document wrapper (when available) This keeps layout consistent and makes templates easier to maintain.

  3. Dompdf renders the HTML to a temporary PDF file Security defaults are applied (chroot, remote disabled, PHP off by default).

  4. The PDF is streamed to the browser or attached to an email Files created for emails are cleaned up automatically.

Quick Start

  1. Install and activate the plugin.
  2. Open any WooCommerce order in wp-admin.
  3. In the Kitgenix PDF Invoicing meta box, click “Download Invoice (PDF)” to confirm templates look correct.
  4. Click “Download PDF” to generate and stream a document.
  5. Open the plugin settings and configure:
    • company details and branding
    • document prefixes
    • which PDFs attach to which WooCommerce emails

If you want to customise the layout, copy the standard templates into your theme and edit them.

Template Overrides

To customise templates safely:

  1. Copy the template files from: templates/standard/

  2. Paste them into your theme at: kitgenix-pdf-invoicing-for-woocommerce/standard/

  3. Edit the theme copies.

The plugin will automatically use your theme templates instead of the bundled versions.

Developers

This plugin is modular and built for extension.

Modules: The plugin boots a module set and allows modification via: kitgenix_pdf_invoicing_modules

Document types: Document types can be extended via: kitgenix_pdf_document_types

Template resolution: Override full template resolution via: kitgenix_pdf_document_template_path

HTML output: Filter the final rendered HTML via: kitgenix_pdf_document_html

Email attachment mapping: Control which documents attach to which emails via: kitgenix_pdf_email_document_map kitgenix_pdf_email_attach_document

PDF generator behaviour: Filname filter: kitgenix_pdf_document_filename Streaming hooks: kitgenix_before_stream_pdf_document kitgenix_after_stream_pdf_document

Dompdf PHP evaluation (advanced / not recommended for most sites): kitgenix_dompdf_enable_php

Data Handling

  • Settings are stored in a single option.
  • Document identifiers and relevant history are stored on the order so documents remain stable.
  • PDFs are generated on demand to temporary files and cleaned up automatically.
  • No custom database tables are created.

Security & Privacy

  • All admin actions are protected with nonces and capability checks.
  • Inputs are sanitised and outputs are escaped appropriately.
  • PDFs for email attachments are generated as temporary files and cleaned up automatically.
  • Dompdf PHP execution is disabled by default. Enable only if you understand the risk: add_filter( ‘kitgenix_dompdf_enable_php’, ‘__return_true’ );

Uninstall

This plugin includes an uninstall routine that removes the plugin settings option when uninstalled via WordPress.

Order meta and document history are intentionally preserved to avoid accidental loss of invoice/credit note history.

Support Development

If this plugin helps you generate clean WooCommerce PDF invoices and reduces admin work, you can support ongoing development here: https://buymeacoffee.com/kitgenix

Credits

Built with ❤︎ by @kitgenix – https://kitgenix.com Bundled library: Dompdf (see vendor/ for licenses)

Gratuitosul piano Business
Testato fino alla versione
WordPress 6.9.1
Questo plugin ora può essere scaricato per il tuo sito .