How to remove the additional checkout buttons on cart page / checkout page?
You can use the additional_checkout_buttons liquid tag to display offsite gateway buttons and accelerated checkout buttons, such as Apple Pay or Google Pay, on your cart page.
The buttons can appear on either your cart page or your checkout page, but not both. This means that if you use the tag on your cart page, the buttons won’t appear on your checkout page.
From your Shopify admin, go to Online Store > Themes.
Find the theme you want to edit, and then click Actions > Edit code.
In the Sections folder, click cart-template.liquid. If your theme doesn’t have a cart-template.liquid, then click cart.liquid in the Templates folder.
Find the following code:
1 2 3 4 5 | {% if additional_checkout_buttons %} <div class="additional-checkout-buttons"> {{ content_for_additional_checkout_buttons }} </div> {% endif %} |
To remove the additional checkout buttons from your cart page, you must delete above code. The additional checkout buttons now appear on the checkout page instead of the cart page.
How to remove the additional checkout buttons from both your cart page and checkout page? It’s simply.
You just change the above code to:
1 2 3 4 5 | {% if additional_checkout_buttons %} <div class="additional-checkout-buttons" style="display:none!important;"> {{ content_for_additional_checkout_buttons }} </div> {% endif %} |
Actually, the additional checkout buttons still keep on cart page but the property CSS “display:none” make it hide.
Thanks for this great information. This solution works well, but the buttons still show up when using direct check out links because the visitor never went to the cart page to trigger the buttons there. Any suggestions?