How to add custom checkout VAT into WooCommerce invoice
Often store owners want to have the custom VAT details to be printed in the invoice. Print Invoice, Packing Slip, Delivery Note & Label Plugin for WooCommerce allows you to add VAT details into the invoice very easily. The custom VAT data inserted at the checkout by the customer can be linked to the invoice in the form of order meta.
Let’s us see how this is achieved with the help of an example.
To have a VAT custom field at the checkout, you will have to install and activate any VAT related plugin in your site. This plugin will bring a custom field at the checkout for inserting the VAT number as shown below:
Customers can insert their VAT number into the provided field on checkout. Upon placing the order, you can view the VAT related details of a particular customer in the WooCommerce Orders page.
The representation of the VAT details within the WooCommerce Orders page may vary depending upon the VAT plugin used in your site. However, for most of the plugins, the custom VAT will be shown as custom order meta as shown below:
Now that an order with the VAT number is placed, next, we will take a look into how this data is linked with invoice.
Upon successfully installing and activating the WooCommerce PDF invoice plugin, navigate to Invoice/Packing from the WordPress dashboard.
All the settings pertaining to invoice can be obtained from the Invoice settings option. (Invoice/Packing > Invoice)
In order to insert the VAT data into the invoice, navigate to the Advanced tab of the invoice settings as shown below.
The advanced invoice settings can be used to configure additional information with respect to order/product meta. The order/product meta details added will be displayed beneath the product in the invoice.
In this case, let us add the meta key vat_number (obtained from WooCommerce orders custom field) as an order meta. Click on Add/Edit Meta field. into the pop up key in the Field name and its corresponding Meta key as shown below:
Field name is the label which will be displayed on the invoice against the custom VAT number. Meta key saves the custom VAT specified by each customer and displays the corresponding value in the invoice.
Save the details, the added order meta can be seen in the order meta field.
Now that the VAT has been linked with the invoice, whenever the invoice for the orders consisting of custom VAT is printed , mailed or downloaded it will have the VAT number displayed in it.
A sample invoice with custom VAT will be as shown below: