Click in ‘Select a project’ and then in ‘New Project’
Define a project name, it can be whatever you want. Then click in ‘Create’. You will be directed to a new page
Make sure your project is selected in the top bar
Click in Library, you will be directed to a new page.
Look for the ‘Google Drive API’ and click it.
Click ‘Enable’
Make sure your project is selected in the top bar. Go to credentials and then click in “Create credentials” and “Service account key”
Select any service account name, make sure JSON is selected and click create. A file is going to be automatically downloaded.
That’s it now you can use that file to configure your drive access.
Configuring a google drive folder to accept invoices
Now that you have your account set up, you need to configure one of your google drive folders to accept files from your new project.
Go to credentials/Manage Service Accounts
You should see a list of all your accounts (in this case there should be only one). Copy its email
Now go to your google drive account, right click in any of your folders and click in share
Paste the email that you just created and click in send
That’s it!
Configuring the drive account in Woo pdf invoice
Now that you have your configuration file, open it (you can open it in any text editor like notepad) and copy its content. This is an example of its content:
Go to your invoice designer and click in drive. Then paste your config content into the JSON Config box. Then in the ‘Selected folder’ box define where the invoices should be stored.
And that’s it. Now when the invoice is created it will be send automatically to your drive account.
Do you want to design more than one page in your pdf? For example a cover page in the first page and the actual content in the second? or showing the term of use in the last page?
If so, all you need to do is go to ‘Template Settings’ and turn on the multi page designer like this:
After turning this feature on you will see a new navigation bar at the top of the pdf builder:
And that’s it! With that navigation bar you can add and remove new pages to your pdf:
The plugin comes packed with all the columns that you will generally need, but sometimes you might want to add a different information. For example, you might have a plugin that adds additional information to each item purchased and you might want to display that information in your invoice.
Adding this information can be easily done using ‘Custom Fields’ and in this tutorial i am going to show you how to do it. Please have in mind that custom fields are only supported in the full version (that you can get here)
To add a custom field to your invoice you will need to do two things:
Create the custom field
Add the custom field to your table
Creating a custom field
To create a custom field click in ‘Custom Field’ and then in ‘Create New Custom Field’
Here you will find three boxes:
Name: The name of your custom field, for this tutorial, i will name my custom field ‘Color’
Type: The type of custom field that you want to create, since we want to create a new column for our invoice table we should select ‘Table Column Field’
Code: The code of your custom field, this can be practially any type of PHP. In this demostration i want to display the ‘COLOR’ attribute of each purchased item so my code should look like this: return $item[‘COLOR’];
At the end my custom code should look like this:
And that’s it! Now i have a custom field that i can add to my invoice table.
Adding a custom field to a table
To add my custom field i just need to add it to the table like any other field.
Select the table and click in ‘Add New Column’
Select my custom column (Which i named ‘Color’) and click in ‘Add Column’
Format the column as you want it (like any other column).
By default the pdf file will have th ename of Invoice_{InvoiceNumber}, if you want to change it go to Template Settings and define a new name in the ‘PDF File Name’ box:
Using order information in the file name (full version only)
To add some of the order information in the file name (for example the customer name, date or order number) click in the tag icon