Change the document title

If you own a license of the Professional extension or our PDF Invoice extensions bundle, you can change the title of the document simply via the plugin settings. Go to WooCommerce > PDF Invoices > Documents > (document of your choice), where you’ll find a field to enter the title of your choice:

If you want to change the title of the Invoice or Packing Slip in the free version, you can do this by filtering the title. You could also create a custom template and simply edit the title manually, but if the document title is the only thing you’re changing, than using the filter is a better option because your template will always be up to date.

You can use the following filters:

  • wpo_wcpdf_invoice_title
  • wpo_wcpdf_packing_slip_title
  • wpo_wcpdf_proforma_title
  • wpo_wcpdf_credit_note_title

New to using filters? Read this first: How to use filters

Example: Change “Invoice” to “Tax Invoice”

Add the following to your themes functions.php (read this if you haven’t edited that file before!):

add_filter( 'wpo_wcpdf_invoice_title', 'wpo_wcpdf_invoice_title' );
function wpo_wcpdf_invoice_title () {
	$invoice_title = 'Tax Invoice';
	return $invoice_title;
}

An alternative method that is also update proof, is by using custom translations. You can then also easily modify the filename. Even if you’re site is in English, you could still use a custom ‘translation’, by using en_GB or en_US, depending on your specific WordPress settings.
You can also use the plugin Say What? to make specific replacements. Make sure to use the exact original (English) string, including capitals, and the textdomain woocommerce-pdf-invoices-packing-slips.