Address fields play a crucial role in furnishing vital details that ensure accurate delivery of orders. With WebToffee’s WooCommerce Address Labels plugin, it’s easier to customize address fields in address labels. In certain cases, we have to remove some address fields from the address labels to make it simple, clear, and to protect customer privacy. WebToffee’s WooCommerce Address Labels plugin helps to remove unnecessary address fields from address labels using custom code snippets. To remove address fields from address labels, use the custom codes provided.
Address fields can be removed from:
- Shipping address
- Billing address
- From address
- Return address
Note :
- By default, in the custom code, the address field name is ‘field_name’.
- Change the ‘field_name’ to the desired address field.
- The image below indicates the format for adding each address field.

Removing address fields from Shipping address
To remove address fields from shipping address, add the code mentioned below to the active child themes functions.php file. If the current theme doesn’t have a functions.php file, use a third-party plugin for the addition.
To know more about how to add a custom code snippet using a third-party plugin refer to this article.
- In the code below replace the ‘field_name’ with the desired address field to be removed.
The following image shows address labels containing shipping addresses with the address field ‘country‘ removed.
Removing address fields from Billing address
To remove address fields from the billing address, add the code mentioned below to the active child themes functions.php file. If the current theme doesn’t have a functions.php file, use any of the code snippet plugins available in WordPress.
- In the code below replace the ‘field_name’ with the desired address field to be removed.
The following image is an example of address labels containing billing addresses with the address field ‘postcode‘ removed.
Removing address fields from From address
To remove address fields from the from address, add the code mentioned below to the active child themes functions.php file. If the current theme doesn’t have a functions.php file, use any of the code snippet plugins available in WordPress.
- In the code below replace the ‘field_name’ with the desired address field to be removed.
The following image is an example of address labels containing from addresses with the address field ‘country‘ removed.
Removing address fields from Return address
To remove address fields from the return address, add the code mentioned below to the active child themes functions.php file. If the current theme doesn’t have a functions.php file, use any of the code snippet plugins available in WordPress.
- In the code below replace the ‘field_name’ with the desired address field to be removed.
The following image is an example of address labels containing return addresses with the address field ‘postcode‘ removed.
Discover More:
Comments (2)
Yohann
January 12, 2024
I bought the plugin and I want to know if it is possible to have the ciy postcode BEFORE the cityname ?
Thanks in advance!
Sanjai Valsan
January 25, 2024
Hi Yohann,
Thanks for reaching out!
With the help of this code snippet, you can have the city postcode before the city name in address labels. For a detailed solution, please refer to this article.