How to check if custom variation field is null in twig?
just vardump() the product.variation_field_mycustomfield that have an empty field then :
then if it is an array  :


{% if product.variation_field_mycustomfield|length == 0 %}
    &lt;div class="mycustomclass"&gt;My custom field: {{ product.variation_field_mycustomfield }}&lt;/div&gt;
{% endif %} 



otherwise, if it is not an array and it is no empty but it has
default value that is considered as empty:


{% if product.variation_field_mycustomfield == 'the vardump output you get at step1' %}
    &lt;div class="mycustomclass"&gt;My custom field: {{ product.variation_field_mycustomfield }}&lt;/div&gt;
{% endif %}