Display company metaobject for loggued in customer

Topic summary

A B2B store owner is attempting to display a custom company metafield (custom.commercial_b2b) containing contact person names to logged-in customers on their homepage using Liquid code. Despite using what appears to be correct syntax for accessing a single-line text metafield with one value, nothing displays on the frontend.

Code attempted:

{% if customer %}
{% assign company_metaobject = customer.metafields.custom.commercial_b2b.value %}
<p>{{ company_metaobject }}</p>
{% endif %}

Key details:

  • Theme: Dawn
  • Metafield type: Single line text, one value (not list)
  • Target location: Homepage
  • The same code works correctly in a test environment

Current status: The issue remains unresolved. The helper confirmed the code structure is correct and successfully tested it elsewhere, suggesting the problem may lie in the metafield definition or store-specific configuration. Without collaborator access to inspect the actual store setup, remote troubleshooting has reached its limits. A direct call was proposed for further investigation.

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

Hi !

I’ts a metafield.