Show products based on custom field I have a custom field enabled on a product - it is a user field that associates a product with a user.

What would the correct setup be to only display products that pertain to the currentUser - as this would match the custom user field?
Depends on whether the user field is on the product or a variant.

If the custom field is on the product:

{% set products = craft.commerce.products.relatedTo({
    sourceElement: currentUser,
    field: 'userFieldName'
}) %}


If the custom field is on the variant:

{% set variantCriteria = craft.commerce.variants.relatedTo({
    sourceElement: currentUser,
    field: 'userFieldName'
}) %}

{% set products = craft.commerce.products.hasVariant(variantCriteria) %}