All Collections
For developers
Uncategorized
Conditionally Hide Dynamic Checkout Buttons
Conditionally Hide Dynamic Checkout Buttons
Shevaughn avatar
Written by Shevaughn
Updated over a week ago

The Dynamic Checkout buttons (such as Apple Pay) will not support line item properties or correctly add the pricing product to the cart for options with associated costs. As such, we do conditionally hide them for products with Product Customizer options on any plan.

If you're still seeing buy now buttons show up, we may need to tweak the install. Search the theme for:

{% if section.settings.enable_payment_button %}
  ##{{ form | payment_button }}
{% endif %}

and replace it with

{% if section.settings.enable_payment_button and product.metafields.product_customizer == empty%}
  ##{{ form | payment_button }}
{% endif %}

If you don't see the {% if section.settings.enable_payment_button %} conditional you can add the Product Customizer conditional like so:

{% if product.metafields.product_customizer == empty %}
  ##{{ form | payment_button }}
{% endif %}
Did this answer your question?