This answer code has given me the way to pull fields out of an array from the order post meta data.
But how would I take this code and adjust it, to add a heading above the new data and a table around the data, within the email?
I would like to add a
<h2>Attendee Info</h2>
above the output of the fields. In addition I'd like to wrap the field output in a<table>
.I would like to add a few of the fields as new columns within the admin Order Table screen, via some sort of function.
In addition, I would also like to be able to display some of these fields within the Admin Order Table, as new columns.
This can be done using instead
woocommerce_email_order_details
action hook this way:Code goes in function.php file of your active child theme (or active theme). Tested and works.
or also using
woocommerce_email_order_meta
action hook, replacing the first line:by this:
You will get something more clean and formatted with your title like: