Custom invoice template in theme's folder
If you want to edit the invoice template generated to a PDF file, follow these steps:
- Copy the file from the plugin directory:
/wp-content/plugins/flexible-invoices/templates/invoice/generated_invoice.phpto your theme directory
- From now on, the file in the theme directory will overwrite the original file from the plugin directory.
- Modify the file according to your needs, e.g. changing the texts, adding or deleting certain pieces of information.
If you want to undo the changes, simply delete the file from the theme directory. The file from the plugin directory will be in use again and all the modifications will be undone.
Invoice template in custom directory
If you would want to define custom location of your invoice template, please add following lines to your theme's functions.php file:
This code will define your custom location of file with invoice template. In this example plugin will use the generated_invoice.php file located in theme-subfolder directory inside your theme's folder. Remember that you can set up a custom path for your directory, just by editing an array in the line 3 of the filter.