How to insert product metafields into packing slips on Order Printer?

I am trying to get the product metafield “custom.bin_location” into the order printer app for the packing slips but any of the existing forums solutions don’t appear to be working.

I have tried

{% for line_item in line_items %}
        {{ line_item.product.metafields.custom.bin_location }}
    {% endfor %}

Does anyone know if/how to get product metafields into the packing slips. Thanks

This should work for you:

{% for line_item in line_items %} 
    <td>{{ line_item.product.metafields.bin_location.value }}</td> 
{% endfor %}

or if the metafield is on the variant level:

{% for line_item in line_items %}
    <td>{{ line_item.variant.metafields.bin_location.value }}</td> 
{% endfor %}