I'm having trouble outputting the list of products from an order on a PDF. I've copied the shortcode example from the Woocommerce Autofill template into my template but every time I save my field the foreach shortcode moves and open and closes at the top of the field which then breaks the output on the pdf. I've checked over the code but I just can't see what I'm doing wrong. Here's my code in the field:
<table class="minimalistBlack">
<thead>
<tr>
<th>Qty</th>
<th>Description</th>
<th>Material</th>
<th>Total Net Weight(kg)</th>
<th>Total Gross Weight(kg)</th>
<th>HS Tariff Code</th>
<th>Country of Origin</th>
<th>Total Value</th>
</tr>
</thead>
<tbody>
[e2pdf-foreach shortcode="e2pdf-wc-order" key="get_items"]
<tr>
<td class="item">
[e2pdf-wc-product key="get_quantity" index="[e2pdf-foreach-index]" order="true"]
</td>
<td>
[e2pdf-wc-product key="get_name" index="[e2pdf-foreach-index]" order="true"]
</td>
<td>
[e2pdf-wc-product key="get_attribute" attribute="material" show="value" index="[e2pdf-foreach-index]"]
</td>
</tr>
[/e2pdf-foreach]
</tbody>
</table>
I've attached images of the issue I'm having when I save the field and the resulting PDF output. Hope you can guide me on how to fix this!