How to display metafields information in order confirmation email

Topic summary

Goal: Show custom metafields (e.g., “method card” details) for a recipe box product directly in the Shopify order confirmation email, under the product info.

Key approach:

  • Edit the order confirmation email template and output metafields with Liquid.
  • Use order-level metafields when needed: {{ metafields.custom.cancelation_reason }}.
  • For item-specific data, loop through line items and reference product or variant metafields:
    • {% for line in subtotal_line_items %}
      • Product metafield: {{ line.product.metafields.custom.product_label }}
      • Variant metafield: {{ line.variant.metafields.custom.item_status }}
    • {% endfor %}

Additional reference: A linked Shopify Community thread provides similar guidance and examples.

Notes:

  • Metafields are custom data fields attached to orders, products, or variants; use the correct namespace/key (e.g., metafields.custom.key).
  • Place the Liquid output where you want the information to appear in the email (e.g., under product details).

Status: A concrete solution (Liquid snippets) was provided; no further disagreements or open questions reported.

Summarized with AI on December 15. AI used: gpt-5.

Hi Guys

We are building recipe boxes website, we are stuck on one little feature i hope it is possible i have hunted many apps but literally. not worked out,

We have recipe box as product,

We can add custom information. in meta fields, where we have added method card details ( not visible to frontend) and link to access purchased method card

but how we can show stored information in custom metafield on confirmation email right under the product info showing in confirmation email.

Looking forward your kind help regarding this

Best regards

Hi,

Check this thread, it seems that they are providing the solution

https://community.shopify.com/c/Shopify-APIs-SDKs/Insert-metafields-in-order-email-notifications/td-p/148358

Hey there! In order to Display the Metafields you need to do the following:

{{ metafields.custom.cancelation_reason  }}         <--- Order Level Metafield

{% for line in subtotal_line_items %} 

  {{ line.product.metafields.custom.product_label }} <---- Product!
  {{ line.variant.metafields.custom.item_status }}   <---- Variant

{% endfor %}

Hope this helps!