Plugin

Active

LH Woocommerce PDF Invoicing dynamically generates a PDF invoice for every WooCommerce order, served via a REST API endpoint. Nothing is written to disk or cached — the PDF is generated fresh on every request, using DOMPDF (vendored via Composer). The invoice number is simply the WooCommerce order number, so no separate invoice sequence or database table is needed.

Key features

  • REST endpoint (GET /wp-json/lh-woocommerce-pdf-invoicing/v1/invoice/{order_id}) that streams a binary PDF, with permission checks so admins can fetch any order and customers only their own.
  • “Download PDF Invoice” button in the order edit screen metabox and the WooCommerce order actions dropdown.
  • “Download Invoice” button on the customer’s My Account → Orders screen.
  • PAID (green) / AMOUNT DUE (amber) banner on the invoice, driven by $order->is_paid() so it works across processing, completed, and custom paid statuses.
  • Site logo, company/registration number, VAT/ABN number, BACS bank details (auto-populated from WooCommerce settings on unpaid orders), and a disclaimer block — all optional and filter-driven.
  • No database tables and no cron jobs — everything is derived from the order at render time.

Requirements

  • WordPress 6.0+
  • PHP 8.0+
  • WooCommerce (any recent version)
  • Composer, for the initial vendor install

Install

  1. Upload the lh-woocommerce-pdf-invoicing folder to wp-content/plugins/.
  2. In the plugin directory, run composer install --no-dev --optimize-autoloader to install DOMPDF and its dependencies into vendor/.
  3. Activate the plugin.

Bundled libraries

DOMPDF v2.x (LGPL-2.1), plus DOMPDF’s own dependencies vendored alongside it — phenx/php-font-lib, phenx/php-svg-lib, masterminds/html5, and sabberworm/php-css-parser. Since these are vendored copies rather than a shared Composer install, PHP-version deprecation fixes to them sometimes need to be patched directly in this plugin rather than waiting on a WooCommerce/DOMPDF update — see the Changelog.

Contents