Automatically create and attach a fully customizable PDF invoice to the completed or processing order email. This extension automatically attaches a PDF copy of the invoice to the completed order email.

Plugin Version: 5.1.2
 
WordPress plugin WooCommerce PDF Invoices

Plugin Features

Customers can login to their account and download previous invoices and admins can resend the PDF or download a copy.

  • Customizable invoice template
  • Legal company information sections like tax number etc
  • Sequential invoice numbering
  • Attach PDF to “New Order” email for admins
  • Add logo image to PDF
  • Customize date format
  • Customize invoice number format
  • Add / Remove columns from the invoice using filters
  • Invoice number column in order list
  • Resend Invoice or download invoice from the order list
  • Invoice info meta box on edit order screen.

Specifications:

Release date: 12-07-2019
Last updated: 27-05-2026
Type: Paid
License: GPL 
Subject: Directory & Documentation for WooCommerce
Compatibility: W5.x W6.x
Includes: Plugin
Language packs: English
Developer: WooCommerce Plugins

Rating:
4.4976525821596 1 1 1 1 1 (213 Votes)

Download by subscription!

You need to log in on the site and purchase a club subscription!

Share with your friends!

 

A Practical Guide to Setting Up WooCommerce PDF Invoices for Automatic PDF Invoicing

WooCommerce PDF Invoices is not just about adding a polished attachment to an email. In a real store workflow, it connects the order, the customer email, the account area, admin actions, and your accounting archive. This guide walks through the practical post-install setup: which fields to fill in first, how to choose when an invoice gets created, how to test the email, where to find the finished PDF, and what to do if the invoice does not look right.

This article is written for a store owner, webmaster, or developer who already understands the basics of WooCommerce and wants to add PDF invoices safely, without creating confusion around numbering, templates, or email delivery. It does not cover how to purchase the product, and it does not suggest that one plugin can replace tax or legal advice. An invoice is a legally significant document, so the final format, required business details, and correction process should always be reviewed against your local regulations and confirmed with your accountant.

From here, we will go through the full workflow: site prep, installation, core setup, a test order, the email attachment, downloading from the admin area, template customization, safe filters, troubleshooting common issues, comparable tools, and the questions that usually come up before rollout on a live store.

Guide cover for WooCommerce PDF Invoices with a workflow map from order to PDF invoice
The core workflow of this guide: a WooCommerce order becomes a PDF invoice that can be emailed to the customer, downloaded from the order, and reviewed in the account area.

How the Plugin Fits into the WooCommerce Order Flow

The main job of WooCommerce PDF Invoices is to create a PDF invoice from order data and make it available where it needs to be. That is different from a standard WooCommerce email: the email shows order details in the message body, while the PDF gives the customer a separate document they can save, forward to accounting, or attach to internal records. For the store administrator, that document is useful because the invoice can be downloaded from the order list, re-sent with an email, and stored in the archive.

The plugin revolves around several WooCommerce touchpoints. The first is order status. An invoice usually makes sense after payment or after processing is complete, so the plugin documentation specifically refers to paid and completed orders. The second is transactional email. Starting with the version where attachment settings were moved to WooCommerce > Settings > Emails, the administrator chooses which emails should include the PDF once the invoice is available. The third is the orders screen, where actions appear for downloading, resending, and checking the invoice number.

It is important not to confuse the invoice generated by the plugin with payment itself. The PDF does not process a payment, does not change payment status, and does not confirm receipt of funds on its own. It uses existing WooCommerce data - the order number, products, totals, tax lines, addresses, payment method, date, and additional fields - and renders that data through a template. That means invoice quality depends not only on the plugin settings, but also on how well your taxes, addresses, currency, statuses, emails, and checkout fields are configured.

What the Customer Gets

For the customer, the value is straightforward: after placing an order, they see a PDF download link on the thank-you page or in My Account, and they may also receive the document as an email attachment. That cuts down on support requests asking for the invoice to be sent again. But that result only appears if the right emails are enabled, the order reaches the correct state, and the PDF is actually generated without errors.

What the Store Administrator Gets

The administrator sees the invoice number in the order list, can download the PDF, resend the email, and generate documents for older orders. This matters especially for stores that handle accounting manually: there is no need to open every order and assemble the data by hand. At the same time, the administrator needs to understand that correcting an already issued invoice is not a simple cosmetic edit. The plugin documentation includes a mode for updating PDF metadata, but that comes with legal risk, so it should only be used deliberately.

Where the Plugin Does Not Replace Other Tools

WooCommerce PDF Invoices is not an inventory logistics system, a full electronic document workflow platform, or a complete accounting solution. It is not positioned as a generator for packing slips, shipping notes, credit notes, or XML documents for e-invoicing. If your store needs those document types, you should look at broader solutions from the related plugins section. Within its own scope, this product is strongest when used for a PDF invoice that is attached to an email and available from the order.

Bottom line: think of the plugin as a document layer on top of a WooCommerce order. Your products, taxes, addresses, and statuses need to be correct first. Only then will the PDF invoice look predictable and consistent.

Who This PDF Invoice Format Works For, and When Another Tool Makes More Sense

WooCommerce PDF Invoices is a good fit for stores that need a clean PDF invoice without building out a large document system. That could be a small B2B store, a digital goods shop, a site with manually handled orders, a service business running on WooCommerce, or a project where customers regularly ask for a separate invoice after payment. In those cases, what matters is automatic email attachment, sequential numbering, company details, a logo, date format, and access to past invoices from the account area.

The plugin is especially useful if your standard WooCommerce emails are already set up and you want to add PDF invoices without rebuilding the cart, checkout, or product structure. Most of the work happens in the admin panel, in email settings, and in the PDF template, so implementation can usually be tested on a sample order without risking the customer journey.

That said, there are situations where it makes sense to consider an alternative early. If you need packing slips, shipping documents, labels, credit notes, electronic formats like UBL/XML, a visual template builder, or deep integration with external accounting systems, WooCommerce PDF Invoices alone may not be enough. Official feature requests for the product include requests for UBL/XML and conditional logic, which by itself suggests that some users expect a broader document workflow than the plugin's core use case provides.

Good-Fit Scenarios

  • The store sends a PDF with the completed-order email. The customer gets the document automatically, and the administrator can download it from the order list.
  • Customers often come back later asking for invoices. The link in My Account reduces manual support requests.
  • You need a clean invoice number that differs from the plain order number. Sequential numbering and suffixes help maintain a separate invoice register.
  • You need to make small changes to labels, columns, or the template. The documentation covers theme templates, placeholders, and filters, so a developer can adapt the output without editing the plugin core.

Scenarios That Call for More Caution

If the store operates in a country with strict requirements for electronic invoices, signatures, archiving, or corrective documents, start by listing the legal requirements. A PDF invoice may be only one part of the process. If you need credit notes, UBL/XML, Peppol, or multiple document types, compare this product with solutions that explicitly advertise those features. And if your project does not have a developer, but the template needs major changes, keep in mind that part of WooCommerce PDF Invoices customization relies on HTML, CSS, and PHP filters.

Support is another point to evaluate carefully. The marketplace page includes recent reviews complaining about lack of support response, but there is also a review from a user who says the plugin itself does the job. That is not a technical defect you can verify in the admin area, but it is still a decision factor: if your store is sensitive to timing, prepare a test plan, a fallback option, and someone who can work with the template without waiting on support.

Decision map for WooCommerce PDF Invoices and alternative solutions
This diagram helps separate a simple PDF invoice workflow from cases that require packing documents, credit notes, or electronic formats.

What to Check Before Installing on a Live Store

Preparation matters more here than it may seem. The plugin works with orders and emails, and that is a critical WooCommerce area. An email issue may not stop sales, but it will create friction for customers and accounting. A problem with invoice numbering may go unnoticed at first, but it can become difficult to fix later. Before installing, put together a short checklist and go through it on a copy of the site or during a quiet period.

Environment Compatibility

The product page lists the minimum requirements for WordPress, WooCommerce, and PHP, along with the versions the extension had been tested with at the time of research. Do not copy those numbers into public-facing content as if they were a permanent guarantee. Before installing, open the product listing and check the current Extension information line. If your site is noticeably behind those requirements, update the environment on a staging copy first. If the site already uses modern WooCommerce order storage, review the product page and validate the extension on standard WooCommerce flows.

For automatic installation through WooCommerce.com, the site needs a reachable REST API and a working WooCommerce.com Update Manager connection. If the REST API is blocked by a security plugin, basic auth, a firewall, or a private-site mode, the automatic install may fail. In that case, use manual ZIP upload through Plugins > Add New Plugin > Upload Plugin, but do not skip the update connection afterward.

Store Data and Tax Logic

The PDF invoice pulls its data from WooCommerce. Before installation, check the following:

  • Store address and business details. In the plugin settings, you will need the company name, legal address, phone number, email, tax IDs, and logo.
  • Taxes. If the store shows taxes incorrectly in the order, the PDF will simply repeat that error in the document.
  • Products and variations. Long product names, product options, and custom fields can affect the width of the PDF table.
  • Order statuses. Decide when an invoice is considered issued: after payment, after processing, after completion, or only manually.
  • Email delivery. If WooCommerce emails are not being delivered, a PDF attachment will not fix that.

Backup and Test Environment

Before your first rollout, make a backup of both files and database. For a standard plugin, that is a routine precaution. For a tool that adds order metadata and invoice numbers, it is a required step. Do not start testing with real historical orders. Create a test product, a test customer, and one new order first. Only after that should you move on to existing orders and bulk actions.

Practical rule of thumb: if you cannot explain how to roll back a change to numbering, email behavior, or the template, then it is too early to enable this on live orders.

Installation and the First Post-Activation Check

Installing WooCommerce PDF Invoices is similar to installing other extensions from the Woo Marketplace. The automatic method is more convenient if the site is connected to WooCommerce.com: you can add the product from the order page, from My Subscriptions, or from the admin area through WooCommerce > Extensions > My Subscriptions. The manual method is to upload the ZIP in Plugins > Add New Plugin > Upload Plugin, install it, and click Activate.

After activation, do not jump straight to older orders. First, make sure a PDF Invoice menu item appears in WooCommerce or next to it, and that the settings page opens without critical errors. Then go to WooCommerce > Settings > Emails and check whether PDF attachment options appear for the emails you need. The plugin documentation states that email selection lives specifically inside WooCommerce email settings, so this cannot be replaced by one global toggle inside the plugin itself.

Safe First-Time Enablement

  1. Open the PDF Invoice settings. Fill in only the basic company details, date, and numbering fields. Do not touch the template or filters yet.
  2. Save the changes. After saving, check the date preview if the interface shows one.
  3. Review the emails. Enable the attachment for just one test email, such as Completed order, rather than turning it on for everything at once.
  4. Create a test order. Use a simple product, a clear address, and a predictable payment method.
  5. Move the order to the target status. To test the completed-order flow, set the order to Completed and resend the email from the order actions if needed.
  6. Download the PDF from the order. Confirm that the number, date, products, totals, and business details are displayed correctly.

What Counts as a Successful Initial Check

A successful check is not just the presence of a file. The invoice should open on a desktop and a mobile device, show the correct business details, reflect the order total, keep the logo intact, avoid clipping long lines, and avoid adding empty tax sections. The email should be sent once, and the PDF should be attached only to the email you selected. If the email did not go out, troubleshoot WooCommerce email delivery first, not the PDF layer.

Initial setup flow for WooCommerce PDF Invoices after activation
Initial setup should move from business details and order status to email delivery, PDF download, and final validation.

Configuring Business Details, Date, Numbering, and File Name

This settings area is the most important part of the rollout. It determines how the document will look to the customer and how accounting will find it later. Do not stop at just the logo and company name. For an invoice, what matters is the legal business information, the date format, the numbering scheme, the file name, when the PDF appears in emails, and how the plugin behaves with older orders.

Company Details and the Legal Information Block

The product page lists sections for company legal information, including tax numbers. The placeholder documentation also lists fields for the registered company name, address, company number, and tax number. That means you do not need to hardcode those values into every line of the template if the settings and placeholders already support them. It is better to keep them in one place and validate them through a test PDF.

For a typical store, fill in:

  • Company name. It should match the name you use in official public documents.
  • Legal address. Check line breaks and the local address format.
  • Contact email and phone number. These are helpful to the customer, but they should not conflict with the WooCommerce sender email.
  • Tax number. If you are not sure which identifier should appear, confirm it with your accountant.
  • Logo. Use a file from the media library or an allowed folder so the PDF generator can read it.

Date Format

The plugin documentation says the date format uses standard PHP date formatting. That is convenient, but it needs to be handled carefully. For example, a shortened year may feel normal in an interface, but a full year is usually safer on invoices. Do not copy an example from the documentation automatically. Choose a format that is clear to the customer, accounting, and your local market.

After saving, check both the interface preview and the final PDF. If the date looks right in settings but odd in the document, review the WordPress locale, the site language, and the PDF font. For languages that use non-Latin characters, it is especially important that the selected font includes the required glyphs.

Invoice Numbering

Sequential numbering is one of the key features of WooCommerce PDF Invoices. But it requires a decision before the first real invoice is issued. If you start with one format and later change the prefix or suffix, your archive may end up with documents in different formats. That is not always wrong, but accounting needs to understand why the format changed.

A good numbering scheme answers three questions:

  • Is it unique? Two invoices should never end up with the same number.
  • Is it readable? A person should be able to tell the invoice number apart from the order number.
  • Is it stable? The format should not depend on random values that change after checkout.

If you need the year in the suffix, the documentation shows the {{year}} placeholder. That is a simple option for stores where accounting maintains yearly registers. But before enabling year-based logic, clarify how invoice numbers are supposed to reset or continue. The plugin gives you formatting tools, not an accounting policy.

PDF File Name

The documentation allows you to assemble the file name from variables such as {{company}}, {{invoicenumber}}, {{invoicedate}}, {{ordernumber}}, {{month}}, {{mon}}, and {{year}}. For the customer, the file name should be short, clear, and free of unnecessary characters. For the administrator, it should make the document easy to identify in a downloads folder.

A practical option is to include the document type, the invoice number, and the order number. The company name in the file name can be useful if the customer receives documents from multiple sellers, but a long name may make the file awkward to use. Test the result on a real order with a long company name and local characters. If you need a stricter format, use the documented pdf_output_filename filter, but only after testing on a site copy.

Settings You Should Not Touch Without a Reason

Do not start the rollout with debug mode, PDF metadata updates, manual template edits, or mass invoice creation for old orders. Those features are useful, but they either change already saved data or make troubleshooting harder. First, get one stable invoice working on a simple new order. Then add the logo, then the email, then the account area, then the template, and only after that move on to bulk operations.

WooCommerce Emails: When to Attach the PDF and How to Avoid Sending Too Much

In WooCommerce, emails shape the customer's expectations. If the PDF is attached to the wrong email, the customer may receive the invoice too early, too late, or more than once. That is why email setup should be treated as a separate implementation step, not the last checkbox in a general settings form.

WooCommerce includes different email types: New order for the admin, Processing order after payment, Completed order when fulfillment is complete, Customer invoice for manually sending order information, Refunded order, and others. WooCommerce documentation explains that each email can be configured separately, and the WooCommerce PDF Invoices documentation states that each email gets its own option to attach the invoice when it is available. That leads to one simple rule: choose the email based on the business event, not on what is easiest to test.

A Typical Strategy for a Standard Store

For a store that ships goods after payment, attaching the PDF to Completed order is often enough. That means the invoice is sent once the order is marked completed. If you sell digital goods or consider the order fulfilled immediately after payment, Processing order may be appropriate, but only if that status truly represents a paid order in your workflow. If you use Processing for manual payment review, the invoice may go out too early.

For the administrator, it can be useful to attach the PDF to New order if accounting or operations wants to see the invoice immediately in the internal notification. But there is an important nuance here: at the moment of a new order, the invoice may not yet be the document the customer should receive. For that reason, the admin email and the customer email are best configured separately.

How to Test an Email with a PDF Attachment

  1. Open WooCommerce > Settings > Emails. Select a specific email, not the general screen.
  2. Make sure the email itself is enabled. If the email is disabled, no attachment will appear.
  3. Check the email type. For testing, HTML or multipart is usually more convenient, but this depends on your mail policy.
  4. Enable the PDF attachment option for that email. Do not enable all emails at once.
  5. Create a test order and move it to the required status. Validate one email and one PDF.
  6. Review your mail plugin log if one is installed. This helps confirm whether the email went out once or was duplicated.

Validation check: the email should match the order event, the PDF should open correctly, and the customer should not receive the same completed-order email twice because an admin repeated the action.

What to Do with Older Orders

The plugin documentation suggests generating an invoice for a previously completed order by resending Completed Order from the order actions metabox. For bulk cases, there are actions for creating and sending invoices, as well as a filter that can prevent the email from being sent during bulk creation. That is useful if you need to generate archive documents without disturbing customers with old emails.

The safest approach is to do this in two passes. First, choose one older test order, create the PDF, and confirm that the number, date, and business details are correct. Then decide whether the customer should receive an email. If the email is not needed, use the documented filter only after testing it on a site copy. Bulk invoice creation without testing can lead to a wave of unwanted emails or numbering that accounting later has to explain.

Relationship between WooCommerce email settings and PDF invoices in WooCommerce PDF Invoices
The email, the order status, and the PDF availability all need to line up. If even one layer is misconfigured, the attachment may never appear or may be sent at the wrong time.

PDF Template, Logo, Fonts, and Invoice Fields

The visual side of an invoice can look cosmetic, but in practice it affects trust, readability, and the legal completeness of the document. WooCommerce PDF Invoices lets you use a custom template, add a logo, change fields, and apply filters. The documentation explicitly states that the template can be copied into the theme folder: wp-content/themes/YOUR_THEME/pdf_templates/template.php. That approach protects your edits from being overwritten during plugin updates, as long as you do not edit the extension files directly.

Why You Should Not Edit the Template Inside the Plugin Folder

Editing plugin files almost always ends with lost changes after an update. Even if an update looks minor, it can replace the template, styles, or the PDF library. The safe path is to use a copy in the theme or child theme. If you do not have a child theme, create one before making changes. If the store is maintained by an agency, document where the template lives and which placeholders were added.

At the same time, the documentation itself warns about a technical DOMPDF limitation: templates use HTML tables, and not every CSS property behaves consistently. That is an important detail. Do not try to reproduce a complex modern website layout in the PDF one-to-one. For invoicing, a simple table structure, a clear readable font, stable spacing, and minimal decorative effects work better.

Logo and Resource Folder

One of the most common PDF invoice issues is a missing logo. The WooCommerce PDF Invoices documentation explains that after updates to the PDF generator, file access rules became stricter, and a Set Resources Folder setting was added for logos stored outside the plugin folder. If the logo does not appear in the PDF, first check the image path, confirm that the file is available under wp-content, and review that setting. If you were using an older workaround through a remote logo, it is usually better to roll that back once the local resources folder is configured correctly.

Fonts and Russian Text

If the invoice contains Russian text, Cyrillic characters, special currency symbols, or multilingual strings, the font must support those characters. The documentation mentions bundled DOMPDF fonts and the option to use Google Fonts or a TrueType font. But adding an external font is not always the best choice: the server needs access to the file, the PDF generator has to be able to read it, and the document should not become unnecessarily heavy.

A practical order of operations looks like this:

  1. Test the invoice with the default font first. If Cyrillic renders correctly, do not complicate things.
  2. If you see boxes or broken characters, choose a font with Cyrillic support. Test regular, bold, and heading styles.
  3. Do not load multiple font families just for aesthetics. One reliable font is better than a complicated mix with unexpected spacing issues.
  4. Open the PDF on a mobile device. Some issues only show up in a different PDF viewer.

Placeholders and Order Fields

The hooks and filters documentation lists placeholders for the logo, company name, address, invoice number, order number, date, payment method, shipping method, addresses, phone, email, tax number, order lines, barcodes, notes, and totals. That is a strong foundation for customization, but not a reason to include everything. An invoice should answer a simple set of questions: who is the seller, who is the customer, what was purchased, how much it cost, what taxes apply, when the document was created, and what its number is.

If you want to add a field from another checkout plugin, first find out where that field is stored on the order and whether a ready-made filter or placeholder already exists. Do not inject arbitrary PHP into the template without checking. In WooCommerce, extra fields often live in order metadata, but their names depend on the plugin that created them. An error in that area can break PDF generation for every order that includes that field.

Order Actions, Older Invoices, and Bulk Export

Once the base setup is done, most admin work happens on the orders screen. The documentation says WooCommerce PDF Invoices adds an invoice number, a resend icon, and a download icon to orders. If the actions column is not visible, you can enable it through Screen Options. This is a common small issue: the plugin is installed, the PDF is being created, but the manager cannot see the icon simply because the column is hidden by screen settings.

Downloading the PDF from an Order

Use the order download as a control point. If the PDF downloads from the admin area and opens correctly, the document generation layer is working. If the email arrives without an attachment but downloading works, the issue is most likely in email settings, order status, or email delivery. If the PDF does not generate even from the order, look at the template, logo, font, temporary folder permissions, and server errors.

Resending the Email

Resending is useful when a customer lost the original email or when the invoice was created after a status change. But resending should not become your everyday validation method. Every time you do it, you may send another transactional email to the customer. To check the layout, download the PDF from the order instead. To test the email flow, use a dedicated test customer or test email address.

Bulk Actions and Archive Work

The plugin supports bulk PDF export into a ZIP file for selected orders. That is convenient for an accountant who needs a document batch for a given period. But bulk export is sensitive to order volume, memory limits, and hosting execution time. If the export hangs, do not repeat it with the same large selection. Split the batch into smaller groups, test one problematic order separately, and check whether any products contain long metadata or whether there is a template issue.

For older orders, date and numbering are a separate risk. If an invoice is created retroactively, make sure accounting is comfortable with the document date and numbering sequence. The documentation includes a mode for updating PDF metadata when debug settings are enabled, but it explicitly warns that this should be used with care. Only use it after understanding the legal implications and testing on one invoice.

Practical Example: Test Order, Email, and Account Area Validation

Below is a working scenario that helps validate WooCommerce PDF Invoices before rollout on a live order flow. It does not require a complex integration, and it covers all the key touchpoints: settings, order status, PDF generation, email delivery, admin access, and customer access.

Goal

You want to generate a PDF invoice for a test order, attach it to the Completed order email, download the document from the order list, and confirm that the customer sees the link in the account area. Once that is verified, you can decide which emails to enable on the live store.

Preparation

  • Create a simple test product. The name should not be too short, so you can check table width.
  • Create a test customer. Use an email address you can access.
  • Fill in the company details in PDF Invoice. Check the logo, address, tax number, and date format.
  • Enable the attachment only for Completed order. Leave the other emails without a PDF for now.
  • Prepare a payment method for testing. A method that lets you create orders quickly without a real charge in a test environment is ideal.

Steps

  1. Place the order as a customer. Fill in the address, phone number, and email the way a real customer would.
  2. Open the order in the admin area. Check the items, total, taxes, payment, and addresses.
  3. Move the order to Completed. If the email does not send automatically, use the action to resend the completed-order email.
  4. Download the PDF from the order list or the order screen. Confirm that the document opens and includes all key data.
  5. Open the customer email. Make sure the PDF is attached and the email was not delivered twice.
  6. Log in to the test customer's My Account. Find the order and check whether the invoice link is available.

Validation

An invoice is ready for a basic launch if five things line up: the number is unique, the date is clear, the business details are correct, the products and totals match the order, and the PDF is available to both the customer and the administrator. Also open the file on a mobile device. If the mobile PDF viewer shows a blank page, broken characters, or fails to open the document, move on to the troubleshooting section.

A Common Gotcha

If the order remains in Pending payment, the email may not send and the invoice may not appear where you expect it. WooCommerce email documentation specifically notes that some emails are not triggered for unpaid orders. During testing, always document the order status and the email that should fire. Do not validate the PDF against a random mix of statuses.

WooCommerce PDF Invoices diagnostic map for email, logo, and PDF issues
This diagnostic map helps you quickly distinguish a PDF generation issue from a problem with email, order status, or logo access.

Safe Customizations Through Filters and the Template

One of the strengths of WooCommerce PDF Invoices is that part of its behavior can be changed without editing the plugin files. The documentation lists placeholders and filters for labels, the account-area button, the file name, line items, metadata, and extra fields. That gives developers a solid extension path. But every code snippet should solve one small problem, be easy to roll back, and be tested on a site copy.

The best place for that code is a separate mini-plugin or a trusted snippets plugin. If the project uses a child theme and the change truly belongs to the site's presentation layer, you can also use the child theme's functions.php. Do not put code into the parent theme and do not edit WooCommerce PDF Invoices files directly.

Change the Button Label in the Account Area

The documentation shows the woocommerce_pdf_my_account_button_label filter. It is useful if customers need a clearer button label, for example not the generic PDF Invoice, but "Download invoice". For a Russian-language store, you could return a Russian string if the entire account area is localized.

add_filter( 'woocommerce_pdf_my_account_button_label', 'jf_pdf_invoice_account_label' );

function jf_pdf_invoice_account_label() {
    return 'Download invoice';
}

After adding the code, open the test customer's My Account area and check one order that has an invoice. If the button disappears, remove the snippet and review the PHP error log. Rolling back is simple: disable the snippet or remove the function.

Shorten the PDF File Name Format

If the built-in filename variables do not produce the result you want, the documentation points to the pdf_output_filename filter. The following example creates a filename in the format invoice-ORDERNUMBER.pdf. This is a custom adaptation based on a documented filter, not a new plugin feature.

add_filter( 'pdf_output_filename', 'jf_pdf_invoice_short_filename', 10, 2 );

function jf_pdf_invoice_short_filename( $filename, $order_id ) {
    $order = wc_get_order( $order_id );

    if ( ! $order ) {
        return $filename;
    }

    return 'invoice-' . sanitize_file_name( $order->get_order_number() ) . '.pdf';
}

Test a snippet like this on a new test order and on an order with a non-standard order number. If the store uses a separate order-numbering plugin, make sure the result does not create duplicate file names. To roll back, disable the snippet and return to the built-in file name configured in settings.

When It Is Better Not to Add Code

Do not add a filter just to hide a data issue in the order. If the PDF is missing a tax number, first check the order field and the plugin settings. If the logo is missing, first check the resources folder. If the email did not send, first check WooCommerce email settings. Code should extend a stable process, not mask a broken base configuration.

How to Evaluate the Finished PDF Before Launch

After the first successful test, it is easy to assume the job is done. But for an invoice, seeing a file attached to an email is not enough. Before going live, evaluate the PDF as a document that will be seen by the customer, accounting, operations, and support. Each group is looking for something different: the customer wants to save the invoice, accounting wants to find the number and business details quickly, the manager wants to download the document from the order, and support wants to understand why a customer did not receive it.

Do not limit testing to one perfect order. Validate against a set of orders that resembles your real store. One order with one product only proves the most basic generation path. You also need orders with multiple items, a discount, shipping, tax, a long product name, a variation, a coupon, a zero-cost line, an address with a long city name, and an order without shipping if you sell digital goods. That is how you find where the table starts to break, where width runs out, where the font looks too small, and where a tax line needs clarification.

Checking the Header and Footer Data

Start with the business details. The company name, legal address, tax number, email, and phone number should not just be present - they should be placed in the document where they are easy to find. If the business details appear in the footer, make sure they are not cut off when printed. If the logo is large, make sure it does not push out the invoice number and date. If the invoice includes both the registered name and the trading name, do not combine them into one line unless there is a clear reason.

Also review how the document looks when printed on A4 or Letter if customers often print invoices. A PDF can look fine on screen but end up with tiny text or clipped margins on paper. DOMPDF is sensitive to spacing, block heights, and tables, so after every template change, it is worth checking not only the screen preview, but also the print dialog.

Checking the Product Table

The product table is where real store data usually exposes issues first. If you sell simple products with short names, the default template may be enough. If you have variations, personalization, sizes, SKUs, tax rates, and long option values, the table can become overloaded. Do not try to dump all order metadata into the PDF. The invoice still needs to remain readable.

A practical test matrix looks like this:

Which Test Orders to Check Before Launching PDF Invoices
Order Type What to Check Problem Indicator Safe Action
One simple product Basic generation, number, date, business details, and email. The PDF is not generated or the email has no attachment. Return to the base settings and the email trigger.
Multiple products and shipping Product lines, shipping, tax, and final total. Totals do not match the order or the table layout breaks. Check WooCommerce taxes and simplify the template.
Variations and long options Text wrapping, product metadata, and column width. The product name overlaps prices or spills off the edge. Reduce metadata output or adjust column widths in the template.
Discount or coupon Discount display, post-discount tax, and final amount. The customer sees a total that differs from the order. Check tax settings and the order of total lines.
Digital product Absence of shipping and correct handling of address blocks. An empty shipping block wastes space or confuses the customer. Adapt the template for digital orders if that is the primary use case.

After a review like this, you will understand whether the issue is in WooCommerce data, in the template, or in internal expectations. For example, if a tax line differs from the accounting report, do not start with CSS. First check WooCommerce tax settings and how the order was calculated.

Checking Customer Access

Customers should be able to get the invoice without contacting support. So test not only the email, but also the account area. Log in as a test customer, open My Account, go to orders, and try downloading the PDF. Then log out and confirm that the same PDF is not accessible to an unrelated user. This is especially important if you added your own link or button: the link must not bypass order and user checks.

If customers often place orders without creating an account, decide in advance how they will retrieve invoices later. The default workflow may depend on whether they have an account and how WooCommerce handles user creation at checkout. If being able to download the invoice again from the account area is a hard requirement, configure registration and order access before rolling out PDF invoices.

Special Order Scenarios to Think Through in Advance

Most setup guides show one standard order, but real stores are more complex. Refunds, partial payments, subscriptions, B2B fields, digital goods, and manual orders can all affect PDF invoices differently. WooCommerce PDF Invoices should not be expected to define your accounting policy for you, but you do need to understand in advance which situations will end up in the document and how your team is supposed to handle them.

Refunds and Corrections

The core job of WooCommerce PDF Invoices is to generate a PDF invoice. If your store handles refunds, clarify whether the customer also needs a separate correction document, credit note, or another form of confirmation. If such a document is required, look at alternatives where credit notes are a native feature. Do not treat a regenerated invoice as a correction document if the product does not create that document type and accounting has not approved that workflow.

In a simple scenario, the original invoice can remain the original document and the refund can be handled through standard WooCommerce and accounting processes. In a stricter scenario, a separate return or correction document is required. That decision is not made in the template settings - it belongs at the business-process level.

Manual Orders and Payment After Invoice Issuance

WooCommerce allows orders to be created manually. That is useful for B2B sales, phone orders, and custom invoicing workflows. But a manual order may not go through the standard customer path, which means the email, status, and PDF access need separate testing. If a manager creates the order manually and sends the customer a payment link, the invoice may be needed either before or after payment - those are different scenarios.

Do not enable automatic PDF sending for every manual email without testing. First create a manual order, add the product, address, and tax data, save the order, send the relevant email, and check when the PDF appears. If the invoice should only be sent after payment, the order status needs to reflect actual payment, not just the fact that the manager created the order.

B2B Fields, VAT ID, and Internal Purchase Numbers

B2B stores often need to show a VAT ID, company number, PO number, or the customer's internal purchasing reference on the invoice. WooCommerce PDF Invoices includes placeholders for the seller's tax and registration details, but additional customer data may require customization. Not every checkout field automatically becomes part of the PDF. You need to verify where the field is stored, what it is called, and whether there is a safe way to output it in the template.

A practical sequence is this: first find the field on the order, then test it on a sample order, then add the output in the template or through a filter, and then test the empty-value case. The most common mistake is getting the field to display nicely on one order while breaking the PDF for orders where the field is missing. Any customization like this needs to handle empty values gracefully.

Subscriptions and Recurring Payments

If the store uses subscriptions or recurring payments, do not assume that a standard order invoice and a renewal-order invoice behave the same way. Check which orders the subscription extension creates, which emails are sent on renewal, and when the invoice is supposed to be generated. The WooCommerce PDF Invoices sources mention email behavior and completed/paid orders, but subscription logic specifically depends on additional extensions and the store's own settings.

Numbering matters especially for subscriptions. Renewal orders may be created automatically, and if an invoice is issued on every renewal, the numbering sequence needs to remain understandable. Test one renewal cycle on a site copy before applying that behavior to live subscriptions.

A Store with Multiple Managers

If several people process orders, document the rules in a short internal guide. Who moves an order to Completed, who resends the email, who downloads ZIP archives, who is allowed to enable PDF metadata updates, who changes the template - none of these roles should be left to guesswork. The plugin adds convenient order actions, but the more convenient an action is, the easier it is to click it by mistake.

For store managers, one short rule is often enough: if a customer asks for the invoice again, first download the PDF from the order and review it, then use resend only when necessary. If the invoice contains an error, the manager should not edit it manually, but hand the issue off to the person responsible for accounting or site administration.

Troubleshooting Common Problems

PDF invoice issues often look the same from the customer's perspective: no file, a blank file, no email, a missing logo, a strange invoice number. But the causes are different. To avoid fixing the wrong layer, start with one question: is the PDF not being generated at all, is it being generated but not attached to the email, or is it being generated but displayed incorrectly?

The PDF Was Not Attached to the Email

Symptom: the customer receives a normal WooCommerce email without a PDF attachment. In the admin area, the PDF may still download normally.

Possible causes: the email is disabled, the wrong email type was selected, the order did not reach the required status, the invoice is not available yet, the mail plugin modifies attachments, or the email is being triggered by a different event than the one you are testing.

What to Check

  • Open WooCommerce > Settings > Emails and check the specific email.
  • Make sure the order is not still in Pending payment.
  • Download the PDF from the order. If it downloads, generation is working.
  • Review the send log in your mail plugin, if one is installed.

How to fix it: enable the attachment only for the specific email you need, repeat the test with a new order, and do not enable all email events at once. If the email is not being sent at all, fix WooCommerce email delivery before checking the PDF layer.

The Logo Does Not Appear on the Invoice

Symptom: a logo is selected in settings, but the PDF shows an empty area or company text instead of the image.

Possible causes: the PDF generator cannot access the file, the logo is stored outside the allowed folder, an outdated remote-logo setting is enabled, the file is too large, or the server blocks access to the resource.

How to fix it: upload the logo to the media library, confirm that the file is stored under wp-content, enable Set Resources Folder if that matches your version and documentation, then switch Remote Logo back to No if local access is already working. After that, generate a new test PDF.

The PDF Opens Blank or with Corrupted Characters

Symptom: the document opens as a blank page, the mobile viewer shows no content, Cyrillic text turns into broken characters, or fragments of CSS appear inside the file.

Possible causes: an unsuitable font, an error in the HTML template, a conflict after a PDF library update, overly complex CSS, bad encoding, or a damaged email attachment.

How to fix it: download the PDF from the admin area and compare it with the file from the email. If the admin version is fine, look at the email attachment and mail transport. If both files are broken, temporarily return to the default template, disable the most recent snippet, test a font with Cyrillic support, and simplify the CSS. If the issue appeared after an update, review the documentation and user reports for similar symptoms, but do not roll back a live store without a backup.

The Invoice Number or Date Looks Wrong

Symptom: the invoice number does not match the expected format, the date displays in an unusual way, or an older order receives an unexpected number.

Possible causes: the format was changed after the first tests, the yearly suffix was enabled differently than expected, an invoice was created for an old order and settings were changed afterward, or the order already contains saved PDF metadata.

How to fix it: stop bulk invoice creation, check one new order, then one old order. Do not use Update PDF Meta without understanding the legal implications. If the invoice has already been sent to the customer, coordinate any correction with accounting.

Bulk Export Hangs or Does Not Create a ZIP

Symptom: when many orders are selected, the export never finishes, the server returns an error, or the downloaded archive is empty.

Possible causes: execution time limits, insufficient memory, one problematic order, a heavy logo, a complex template, or too large a batch.

How to fix it: reduce the batch size, export a smaller set of orders, identify the problematic order, temporarily test with the default template, and reduce the logo file size. If you need export regularly, discuss PHP limits with your hosting provider and plan archive work in batches.

The PDF Actions Are Not Visible on the Order Screen

Symptom: the plugin is active, but the download or send icons do not appear in the order list.

Possible causes: the WooCommerce actions column is hidden, the user does not have enough permissions, the order is in a state where the invoice has not yet been created, or another plugin has modified the orders screen.

How to fix it: open Screen Options on the orders page and enable the actions column. Check under an administrator or shop manager account. Then open the order itself and see whether the PDF Invoice metabox is available.

Performance, Security, and PDF Storage

PDF invoices are generated on the server side, so they depend on PHP, the generation library, the temporary folder, and resource access. The WooCommerce PDF Invoices documentation says PDFs are created on demand and stored in the hosting provider's temporary folder, and that a scheduled task clears them out so they do not fill the server. That is convenient, but it does not mean performance can be ignored.

On a small store, PDF generation is usually invisible. On a store with a high order volume, long product data, a large logo, and frequent bulk exports, the load can become noticeable. Complex fonts, external resources, and a bulky HTML template increase generation time. The simpler the document, the more reliably it tends to work.

Securing Access to Invoices

An invoice contains the customer's personal data: name, address, email, phone number, order contents, and totals. That means direct public links to PDFs should never be exposed, and invoices should not be stored in a public folder without access control. In the standard workflow, the customer gets access through the email or the account area, and the administrator gets access through the order. If you add custom links or modify the template, do not bypass user validation.

Cache and Optimization

Caching plugins generally should not cache the WooCommerce admin area or customer account area. But aggressive server-side or CDN rules can interfere with file downloads and account pages. If the invoice link in My Account works for the administrator but not for the customer, check user permissions, account-area caching, and security plugins. For PDF files, do not add custom caching rules unless you understand exactly where the files are generated and how access is validated.

SEO Hardly Matters Here

PDF invoices are not meant to be indexed by search engines. They are private order documents, not public pages. Do not try to improve SEO by adding text to the invoice or exposing PDFs publicly. Instead, make sure the documents do not appear in public sitemaps, are not accessible through guessable URLs, and are not indexed accidentally. For store SEO, what matters far more is your product pages, category pages, and commercial content, while invoices should remain part of a private order-service workflow.

How It Connects with Other WooCommerce Systems

WooCommerce PDF Invoices rarely operates in complete isolation. It depends on WooCommerce emails, order statuses, user roles, taxes, the media library, and sometimes mail-delivery plugins. The integration should be designed so each tool handles its own part of the process rather than duplicating someone else's job.

SMTP Plugin

An SMTP plugin or transactional email service is responsible for email delivery, but it should not be responsible for generating the PDF. Configure WooCommerce PDF Invoices to create the attachment, and use SMTP for reliable sending. The test is simple: if the PDF downloads from the order but never arrives as an attachment, review the email settings and the mail log. If no email goes out at all, the PDF plugin is not the first thing to blame.

Tax-ID and Extra-Field Plugins

B2B stores often collect a VAT ID, company registration number, or internal purchase reference. If that data needs to appear on the invoice, verify where it is stored in the order. For simple label changes, filters may be enough. For new fields, you will need a developer who can carefully add the setting and output through documented actions or placeholders. Do not promise the customer that a VAT ID will appear in the PDF until you have tested the specific field plugin in use.

Order Status Plugins

If the store uses custom statuses, decide in advance whether those statuses should generate or send an invoice. The developer documentation includes a filter for the invoice status array, but using it requires a clear understanding of the business logic. For example, a status like "preparing for shipment" may be internal and may not mean an invoice should go to the customer. Draw the status map first, then add the filter.

Accounting and Manual Archiving

If accounting is managed outside WooCommerce, the plugin's PDF can still serve as an archive file, but the handoff process needs to be defined. Who exports the ZIP, how often, for which statuses, where the archive is stored, how refunds are handled, and who is responsible for corrections - these are questions to answer before launch. The plugin provides the document, but it does not define the company's internal operating procedure.

Questions to Resolve Before Launch

Can the plugin's PDF be treated as a fully valid legal invoice?

The plugin helps generate a PDF document from the order, business details, and template. But whether it is legally sufficient depends on the country, business type, tax regime, required invoice elements, and document correction rules. The invoice format should be reviewed with your accountant or tax advisor.

Where is the main setting area after installation?

The documentation points to a PDF Invoice menu inside the WooCommerce section. That is where the invoice settings are configured. The selection of which emails should include the PDF is located in WooCommerce > Settings > Emails, because that is part of WooCommerce email settings.

Why was no PDF sent if the order already exists?

Creating an order and sending the relevant email are separate events. Check the order status, whether that specific email is enabled, whether PDF attachment is enabled for that email, and whether the PDF is generated when downloaded from the admin area. If the order is in Pending payment, some WooCommerce emails may not fire.

Can an invoice that has already been created be changed?

Technically, the documentation describes a way to update PDF metadata when a debug setting is enabled. But correcting an already issued invoice can have legal consequences. Do not treat that mode as normal editing. First clarify the correction process with your accountant and test with one sample document.

What should I do if the logo disappears in the PDF?

Check that the logo file is accessible to the PDF generator, stored in an allowed folder, and not blocked by the server. The documentation mentions the Set Resources Folder setting for this issue, which allows resources to be used from wp-content. After making the change, generate a new test PDF.

Is the plugin suitable for packing slips and credit notes?

The core WooCommerce PDF Invoices product is focused on PDF invoices. If you need packing slips, delivery notes, credit notes, shipping labels, or electronic formats, compare it with alternatives where those document types are a primary feature.

Can I add my own column to the product table?

The developer documentation includes filters for changing table headers and order rows, along with examples for adding SKU output. This is a developer task: you need to verify the product data, the PDF table width, the tax lines, and behavior on orders with variations.

Should PDF invoices be indexed by search engines?

No. Invoices contain personal and commercial order data, so they should be accessible only to the customer and the administrator. If you add custom links or custom PDF storage, make sure the documents do not become public.

When WooCommerce PDF Invoices Is the Right Choice

WooCommerce PDF Invoices is a strong choice if you need a clear PDF invoice tied to standard WooCommerce emails, the customer account area, and admin order actions. Its main strengths are automatic attachment to selected emails, sequential numbering, company details, logo support, filename formatting, downloading from the order, and the ability to customize behavior through the template and documented filters.

Before going live, confirm three things: the environment meets the current requirements on the product page, the email is sent at exactly the right moment, and the PDF opens correctly with the right business details. If an invoice plus light template customization is enough for your store, you can download the WordPress version and test it on a staging copy or a dedicated test order. If the store requires packing slips, credit notes, UBL/XML, complex localization, or a visual document builder, compare alternatives right away instead of stretching the product beyond its core purpose.

The safest implementation path is to move in small steps: basic business details, one test order, one email, one PDF, account-area validation, then the template, filters, and bulk operations. That sequence saves time because it helps you quickly see exactly where the plugin is working, where WooCommerce email handling begins, where accounting requirements come into play, and where a different tool may be the better choice.

By OceanTheme.org Editorial Team

 

You are not logged in to post comments.