Customer First Name on Subject Section

New Member
1 0 0

I'm trying to use customer.first_name on the Subject section but I couldn't find a way to do it. You guys can help me out on that? Thanks

Shopify Partner
820 73 147

Hi @fsebastiao 

Hope you're having a great day!

As specified here by Shopify:

The customer object is global in the sense that you can access it in all layout, template, and snippet files. However, the object is only defined when a customer is logged in.

{% if shop.customer_accounts_enabled %}
  {% if customer %}
    Customer is logged in. You can access the customer attributes such as {{ customer.first_name }}.
  {% else %}
    {{ 'Log in' | customer_login_link }}
    {% if shop.customer_accounts_optional %}
      {{ 'Create an account' | customer_register_link }}
    {% endif %}
  {% endif %}
{% endif %}

If you found this comment useful, hit the 'Like' and 'Accepted solution' buttons.