WooCommerce PDF Invoices

WooCommerce PDF Invoices attaches a fully customizable PDF invoice to a paid or completed order and other WooCommerce emails.

Invoices can accessed via a Download Invoice link on the Thank You page or in the My Orders area and be resent by selecting Completed Order from the order actions meta box.

The layout of templates is fully customizable, and fields can be added or removed as needed.

Installation and Updating ↑ Back to top

For a new installation please review our extension installation guide

If you need to update the extension you can do this from your WordPress admin if you have connected the site to WooCommerce.com, you can read more about that here

You can also update manually by downloading the latest version from your WooCommerce account

Once you have the zip file downloaded you should deactivate and delete the existing version from your WordPress plugins page and then install the new version using the upload option. You will not lose any settings or data by updating this way.

Setup and Configuration ↑ Back to top

PDF Invoice settings can be found in the PDF Invoice menu which is located in the WooCommerce menu tab. Complete the settings form, there are tool tips (?) if you need more information on a setting.

It’s important to remember that an invoice is a legal document, and the format shouldn’t be changed once set up.

Date Format ↑ Back to top

You can set the format of the invoice date, using standard PHP date functions: (http://php.net/manual/en/function.date.php)

An example of the chosen date format is shown in the PDF Invoice settings once saved.

Screen Shot 2013-07-08 at 09.03.58

Examples

  • d M Y : 08 Jul 2013
  • j F, Y : 8 July, 2013
  • d-m-y : 08-07-13

Testing Invoice Layouts ↑ Back to top

To test your layout and settings, create a test order and set it to completed.

All orders, completed or otherwise, will have a “Download Invoice” icon in the actions area:

Screen Shot 2013-07-06 at 12.41.53

Click and check the invoice layout.

PDF File Name Parameters ↑ Back to top

The PDF filename should be unique and easy to spot for customers. Use up to 3 variables and any other text. For example:

INVOICE {{company}}-{{invoicenumber}}-{{invoicedate}}

would give a file name of INVOICE-WooThemes-AAA1234BBB-12052013.pdf

You can arrange the variables in any order.

PDF Invoice Number Suffix ↑ Back to top

If required, the invoice number suffix can include the current year. Add:

{{year}}

to the suffix setting.

Create Invoices for Existing Orders ↑ Back to top

If you need to create an invoice for a previously completed order, just resend the Completed Order email from the Order Actions meta box.

Order Screen ↑ Back to top

Order Layout ↑ Back to top

The PDF invoice extension adds new features to the WooCommerce Orders screen.

Screen Shot 2013-07-06 at 12.41.53-1

  • Invoice number: Click to download an invoice to your computer.
  • Send invoice icon: Click to resend a Completed Order email to the customer
  • Download invoice icon: Click to download a copy of the invoice to your computer. This icon shows for all orders, completed or otherwise. If the order is incomplete, no invoice will be shown for the downloaded PDF.

By default the actions column is hidden by WooCommerce, you can enable it in Screen Options

Bulk Actions Drop Down Menu ↑ Back to top

If you need to modify the existing PDF Invoice information, for example if the wrong date is on the invoice or the format needs to be changed you can make changes with the “Update PDF Meta” option. It will only show if the debugging option has been set in PDF Invoice settings – Please ensure you are aware of any potential legal issues before using this option.. Ideally, make the necessary changes in your settings if required and then update one invoice to confirm that everything has worked correctly.

If you want to create invoices for some orders that do not already have an invoice number you can use the “Create and Email Invoice”. There is a filter available to prevent the email from being sent.

This option will work for past orders, especially if the option in the settings is timing out.

Usage ↑ Back to top

A PDF will be attached to all Paid or Completed Order emails.

Customers can get a PDF invoice via a Download Invoice link on the Thank You page or access copies from their My Orders area.

You can also attach a PDF to the ‘New Order’ emails received by the store admin.

Customization ↑ Back to top

Copy the template to your theme ↑ Back to top

To customize the template, first create a copy in your theme.

wp-content/themes/YOUR_THEME/pdf_templates/template.php

Once the file is ready, you can edit.

Add new placeholders ↑ Back to top

see Hooks and Filters in WooCommerce PDF Invoice for more information — and change the layout and move sections around.

Template files use HTML tables. This is a limitation of the DOMPDF library, in that some CSS classes can be used, but you’ll need to experiment to see which work and which don’t.

Using the included fonts ↑ Back to top

wp-content/plugins/woocommerce-pdf-invoice/lib/dompdf/lib/fonts/
wp-content/plugins/woocommerce-pdf-invoice/lib/dompdf/lib/fonts/dompdf_font_family_cache.dist.php

You can then change the font in the template.php file. If the font is not included with DOMPDF, you can use Google Fonts. Add a link to template.php and then add the style as you would in a normal HTML file.

Using Google Fonts ↑ Back to top

Get the font url from Google (https://fonts.google.com) and then modify the template as follows. It is important that your font contains all of the necessary characters for your language and it should also contain enough styles for normal, bold, H1, H2.

    @import url('https://fonts.googleapis.com/css?family=Orbitron');

    body {
      font-family: 'Orbitron', sans-serif, "DejaVu Sans Mono", sans-serif, monospace;
      font-size:11px;
    }

Using a True Type font ↑ Back to top

Make sure you know the location of the font and then modify the template as follows. It is important that your font contains all of the necessary characters for your language and it should also contain enough styles for normal, bold, H1, H2.

    @font-face {
      font-family: 'Firefly';
      font-style: normal;
      font-weight: normal;
      src: url(http://example.com/fonts/firefly.ttf) format('truetype');
    }
    body {
      font-family: 'Orbitron', sans-serif, "DejaVu Sans Mono", sans-serif, monospace;
      font-size:11px;
    }

Using Hooks and Filters ↑ Back to top

For more information on hooks and filters in WooCommerce PDF Invoice, see: Hooks and Filters in WooCommerce PDF Invoice.

Translating PDF Invoice ↑ Back to top

You can use the free Loco Translate plugin to translate any or all of of the strings in PDF Invoice. If you only want to change two or three strings, then the Say What? free plugin may be better suited. (Use the domain: woocommerce-pdf-invoice)

If you use Loco Translate and keep custom translations in woocommerce-pdf-invoice/languages, they can be lost when upgrading. To keep them upgrade safe, place them in wp-content/languages/woocommerce-pdf-invoice/

FAQ ↑ Back to top

Are PDFs stored in a secure way?

PDFs are created as needed and stored in your hosting tmp folder, which isn’t typically accessible from a browser. A CRON task deletes PDFs every half hour to avoid filling up your server.

Bulk Exporting PDFs ↑ Back to top

From version 4.0.0 of WooCommerce PDF Invoice there is an ability for store owners to create a zip file of several invoices. This is version 1 of bulk exporting. Future releases of WooCommerce PDF Invoice will improve on this, based on feedback from store owners. Please email any ideas or feedback to plugins@chromeorange.co.uk

To export several PDFs, view your order list, select the orders you want the PDFs for, choose “Bulk Export PDFs” from the “Bulk Actions” drop down and click “Apply”. Once the zip file is available there will be a link to download it.

bulk export pdfs

Editing invoices ↑ Back to top

From version 4.2.0 of PDF Invoices it is possible to modify previously uneditable invoice data.

To access this the PDF debugging option should be set to yes. Once that is done edit the order that needs to be modified and look for the Invoice meta box, usually at the bottom of the page.

Before making any changes here you should be aware of any legal issues that may occur if you modify an invoice that has already been issued to a customer, if you are not sure please consult your accountant.

Feedback and feature requests ↑ Back to top

For feedback on the PDF Invoice extension, this documentation or for feature requests please email plugins@chromeorange.co.uk

Questions & Support ↑ Back to top

Have a question before you buy? Please fill out this pre-sales form.

Already purchased and need some assistance? Get in touch the developer via the Help Desk.

WooCommerce - the most customizable eCommerce platform for building your online business.

Back to the top