Style custom order meta keys

WooCommerce
12 March, 2022 05:08:48
j.durand
Topics: 8
Messages: 29
Hi again :)

After having booked their products (events), our customers have to fill the attendees form fields. Then they can confirm the order.
I have found this data in the visual mapper under "order meta keys". And I can display them with this code:
[e2pdf-wc-order key="att_info-17929_1" meta="true"]

But I don't know how to style them. As you can see in attachement all attendees infos (name mail) are one next to the other. I would like to display one per line or something else.

And if possible I would like to hide have only first name and lastname, not the email...

Best regards
12 March, 2022 07:42:48
E2Pdf
Support
Topics: 7
Messages: 3177
Hi,

Unfortunately E2Pdf doesn't have built-in functionality to output information separately from such string however you must be able to use custom PHP filter to output data as needed. It must be added to your theme functions.php or as PHP Snippet via plugin: https://codeshare.io/yoZd10

After adding filter you must be able to use something like this:

[e2pdf-wc-order key="att_info-17929_1" meta="true" path="0.0"] - will output 1st row email
[e2pdf-wc-order key="att_info-17929_1" meta="true" path="0.1"] - will output 1st row firstname
[e2pdf-wc-order key="att_info-17929_1" meta="true" path="0.2"] - will output 1st row lastname

[e2pdf-wc-order key="att_info-17929_1" meta="true" path="1.0"] - will output 2nd row email
[e2pdf-wc-order key="att_info-17929_1" meta="true" path="1.1"] - will output 2nd row firstname
[e2pdf-wc-order key="att_info-17929_1" meta="true" path="1.2"] - will output 2nd row lastname

Where 1.0 - 1 - is index of ][, which we suspect is separator of rows, and 0 is index of column separated by ||

We would really appreciate your feedback at WordPress.org!
12 March, 2022 09:07:32
j.durand
Topics: 8
Messages: 29
Thank you again and again!!!