Home>Docs>WooCommerce PDF Invoices, Packing Slips and Credit Notes Plugin>Customizing Address Format in WooCommerce Invoices and Other Document Types

Customizing Address Format in WooCommerce Invoices and Other Document Types

Last updated on February 1, 2024

Single placeholders are now used to display addresses in documents. To customize or reorder elements inside an address type, store owners must replace the existing placeholders with a custom code snippet.

Customizing the From address format

The placeholder [wfte_from_address] displays the From address on all document types. The store address specified under the WooCommerce Settings page (WooCommerce > Settings > General) is the From address. The From address follows the WooCommerce format. To customize or reorder the From address format, follow these steps:

  1. Navigate to Invoice/Packing > Invoice (or preferred document type) > Customize.
  2. Go to the Code tab of the active invoice template.
Navigating to the Code tab
Navigating to the Code tab
  1. Inside the Code editor, find the placeholder [wfte_from_address] and replace it with the custom code snippet below. (Make the customizations/rearrangements to the custom code snippet as per your requirement before adding it).

The placeholders in the custom code represents the following fields/values:

[wfte_from_address_name] – From address name
[wfte_from_address_address_line1] – From address line 1
[wfte_from_address_address_line2] – From address line 2
[wfte_from_address_city] – From address city
[wfte_from_address_state] – From address state
[wfte_from_address_postcode] – From address zipcode
[wfte_from_address_country] – From address country
[wfte_from_address_contact_number] – From address contact number
[wfte_from_address_vat] – From address VAT number

  1. Finally, click on Save to reflect the changes.

Customizing the Billing address format

A single placeholder [wfte_billing_address] is used to display the billing address in documents. The billing address is the one specified by the customer during order placement. It will follow WooCommerce billing address format. Follow the below steps to customize the billing address format (Here, let’s take an example of invoice) according to your preference.

  1. Navigate to Invoice/Packing > Invoice (or preferred document type) > Customize.
  2. Go to the Code tab of the active invoice template.
  3. Inside the Code editor, find the placeholder [wfte_billing_address] and replace it with the custom code snippet given below. (Make the necessary customizations to the custom code snippet before adding it).

The placeholders in the custom code represents the following fields/values:

[wfte_billing_address_name] – Billing address name
[wfte_billing_address_company] – Billing address company name
[wfte_billing_address_address_1] – Billing address line 1
[wfte_billing_address_address_2] – Billing address line 2
[wfte_billing_address_city] – Billing address city
[wfte_billing_address_state] – Billing address state
[wfte_billing_address_postcode] – Billing address zipcode
[wfte_billing_address_country] – Billing address country

  1. Finally, click on Save to reflect the changes.

Customizing the Shipping address format

[wfte_shipping_address] is the placeholder used for showing the shipping address on documents. The shipping address shown on the document types will follow the WooCommerce shipping address format. To customize or rearrange the shipping address format, follow the below steps:

  1. Navigate to Invoice/Packing > Invoice (or preferred document type) > Customize.
  2. Go to the Code tab of the active invoice template.
  3. Inside the Code editor, find the placeholder [wfte_shipping_address] and replace it with the custom code snippet given below (Make sure to alter the code snippet as per your requirement before adding it).

The placeholders in the custom code represents the following fields/values:

[wfte_shipping_address_name] – Shipping address name
[wfte_shipping_address_company] – Shipping address company name
[wfte_shipping_address_address_1] – Shipping address line 1
[wfte_shipping_address_address_2] – Shipping address line 2
[wfte_shipping_address_city] – Shipping address city
[wfte_shipping_address_state] – Shipping address state
[wfte_shipping_address_postcode] – Shipping address zipcode
[wfte_shipping_address_country] – Shipping address country
[wfte_shipping_address_phone] – Shipping address phone number

  1. Finally, click on Save to reflect the changes.

Customizing the Return address format

The return address shown on dispatch labels and credit notes use a single placeholder [wfte_return_address]. It follows the WooCommerce return address format. To customize the return address format, store owners can use the code snippet given below. Here are the detailed steps:

  1. Navigate to Invoice/Packing > Invoice (or preferred document type) > Customize.
  2. Go to the Code tab of the active invoice template.
  3. Inside the Code editor, find the placeholder [wfte_return_address] and replace it with the below code snippet (Make sure to alter the code snippet as per your requirement).

The placeholders in the custom code represents the following fields/values:

[wfte_return_address_name] – Return address name
[wfte_return_address_company] – Return address company name
[wfte_return_address_address_line1] – Return address line 1
[wfte_return_address_address_line2] – Return address line 2
[wfte_return_address_city] – Return address city
[wfte_return_address_state] – Return address state
[wfte_from_address_postcode] – Return address zipcode
[wfte_return_address_country] – Return address country
[wfte_return_address_contact_number] – Return address contact number

  1. Finally, click on Save to reflect the changes.