Altering Address Fields to EU Format

Last updated on September 23, 2024

The plugin displays the address in US format by default in all document types. However, following either of the methods below, this can easily be changed to EU format.

Invoice showing address in EU format
Invoice showing address in EU format

Converting to EU format by adding code

There can be instances where you prefer to print the addresses according to EU standards, which is in the order of Zip, City, and State. To modify the plugin’s default behavior, insert the code snippet below 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 addresses in EU format

Converting to EU format using Customizer

The Customizer for WooCommerce PDF Invoices plugin allows you to change the address to EU format visually. 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 the 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 Activate the template to use it. This template now has the address in the EU format.
Visually changing to EU address format using the customizer