Skip to main content

Include email in WooCommerce address output

Including email in formatted_address output for WooCommerce is easy as 1-2-3.
For some reason Automattic decided to completely disable email in address output without a filter.
Same would probably be achievable by simply editing and replacing template file, or adding your own function in template.
However if you would prefer to append email using filters, it should be done like this:

Step 1:

Add email to address format

Step 2:

Add email to list of visible data

Step 3:

Replace {email} shortcode we added in Step 1 with actual email address retrieved in Step 2.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please don’t paste any HTML, Js or PHP code into comments box, use pastebin.com or similar service to share code examples.

Characters left: 1000