How to alter address format to suit European standards in WooCommerce shipments
WooCommerce PDF Invoice, Packing Slip, Delivery Notes and Shipping Label plugin allows you to print and download various types of shipments. By default, the plugin prints the address in US standard format which is in the order City, State, Zip in all the shipments.
There can be instances where you prefer to print the addresses in EU standards which is in the order Zip, City, State. In that case, the default behavior of the plugin can be modified by inserting 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.
Comments (2)
Mohammed Hassan
February 6, 2021
What if I want to change the order?
for example I want billing address 1 and 2 before the company? and write some texts before each field for example “Company Name: $company” is there something similar to this?
Mark
February 19, 2021
Hi Mohammed,
Here is a sample code to do:
https://gist.github.com/webtoffee-git/16e58d75ca3eba43f98f0dfadd242c5e