-
Created metafield with name Display input field and type True or false.
-
Code in snippets → buy-buttons.liquid
Just after this code
{%- form 'product',
product,
id: product_form_id,
class: 'form',
novalidate: 'novalidate',
data-type: 'add-to-cart-form'
-%}
Here is the code
{% if product.metafields.custom.display_input_field %}
{% endif %}
Regard
Guleria