Need Help to show country_of_origin on email notification?

Topic summary

A user is attempting to display a product’s country of origin in Shopify email notifications (specifically order invoices). The country_of_origin value is already populated in the product’s admin settings.

Attempted Solutions:
The user has tried accessing the data using Liquid template code:

  • {{ line_item.product.metafields.custom.country_of_origin }}
  • {{ line.variant.metafields.custom.country_of_origin }}

Another participant suggested iterating through order line items with a table structure to display product title, country of origin, quantity, and price. However, the original poster confirmed this approach also did not work.

Current Status:
The issue remains unresolved. The correct Liquid syntax or metafield namespace to access the country_of_origin data in email templates has not been identified.

Summarized with AI on November 18. AI used: claude-sonnet-4-5-20250929.

Hello Team!

I am looking for to add country_of_origin of the Product on email notifications.
For Ex: Order invoice Notification.

The value is already added on the Product at admin side.

I have try many solution but not succeed.
Try with below code:

{{ line.variant.metafields.custom.country_of_origin }}
{{ line_item.product.metafields.custom.country_of_origin }}

Thanks in advanced!
Mohit P.

Hi @mohitp

You can consider trying the below code to see if it works:

{% for line in order.line_items %}

{{ line.product.title }} {{ line.quantity }} {{ line.price }} {{ line.variant.metafields.custom.country_of_origin }}

{% endfor %}

I hope this can help.

Hi, @SwiftfromOC ,

I have already tried this code, not working for me.