The plugin by default displays the address in US format in all the document types. This can easily be changed to EU format, following either of the below-mentioned methods.
- By adding customized code snippets.
- Using the Customizer for WooCommerce PDF Invoices plugin, the address format can be customized visually.
Converting to EU format by adding code
There can be instances where you prefer to print the addresses in EU standards which is in the order Zip, City, and State. To modify this default behavior of the plugin, insert the below-given code snippet in the active theme’s functions.php file.
Likewise, if you wish to display only the Zip, City in the address, then insert the following code snippet in the active theme’s functions.php file.
Sample invoices with address in EU format
Converting to EU format using Customizer
The Customizer for WooCommerce PDF Invoices plugin allows you to visually change the address to EU format. Follow the steps mentioned below to achieve the same.
- Select the required block in which the address format has to be changed.
- In the Editor pane, drag and drop the Postcode asset before City.
- Click on the Merge icon, this displays a checkbox before all the assets.
- Check Postcode and City to merge them.
- Click on Apply.
- Repeat the same in all the blocks where the address needs to be converted to EU format.
- Save and Active the template to use it. This template now has the address the EU format.