Order Printer App, adding customer's tags and metafields

Shopify Partner
8 0 2

Hi everyone,

I am trying to add customer's tag and metafield information on the invoice template.

I tried this sample code but didn't work.  (no error was shown)

{%- if customer.tags contains "test" -%}
    {%- if customer.metafields.my_fields.test_label -%}
      {{ customer.metafields.my_fields.test_label }}
    {%- endif -%}
{%- endif -%}

Any idea how can I show the metafield value?

Thanks in advance for your help!

Replies 2 (2)

Shopify Partner
12 1 2

Late reply but this will work.


While customer tags are not accessible in the Order Printer templates, you can access order tags. The best workaround here is to use the Flow app to automatically add a tag to the order based on the customer's tag. 


Something like this:



Then in the Order Printer template, you can access the order tag:

{% for tag in tags %}
{% if tag == 'problem_customer'%}This is some text.{% endif %}
{% endfor %}


Hope this helps someone!