Completely stopping Express Checkout buttons from showing (Cart/Checkout)

Highlighted
Excursionist
12 3 3

Hey All!

 

I've been having an issue that the Shopify Support Team couldn't help me with so I figured I'd post it here with my solution for anyone else having this problem.

 

So I was trying to remove the Express Checkout Buttons from the Checkout process but keep the option to pay with Paypal (The Express Checkout Flow was applying the delivery charge after the user had been through the Paypal portal which was a weird flow). I looked at the docs and emailed Shopify Support to confirm my findings (I have a big client so I wanted to be sure this would be our solution). They told me exactly what I had found in the docs which was to add:

{% if additional_checkout_buttons %}
  <div class="additional_checkout_buttons">{{ content_for_additional_checkout_buttons }}</div>
{% endif %}

 

to the cart.liquid file and hide it with CSS:

.additional_checkout_buttons{display:none}

and, as if by magic, it will never appear on the Checkout process again because it can only appear on one at a time.

 

THIS IS ONLY PARTLY CORRECT!

 

I'm not sure how the Checkout process checks to see if the additional checkout buttons are being shown on the cart page but it seems like it checks the page you were on before you navigated to the checkout page. What this means is that if you were on /cart and then went to /checkout you would not see the Express Checkout buttons because they were on the cart page. BUT if you were on a collection page and by using a cart sidebar (like the Prestige Theme has) clicked on a button that takes you to the Checkout page then the Express Checkout Buttons will appear!

 

This was something I tinkered around with to find out. I was not told this by any of the Shopify Staff so I might be wrong. Another reason of posting here was to find out more.

 

So a solution I found was to put the above "additional_checkout_buttons" code into a place that appears on every page. I chose to do it on the Cart Drawer because I had already put it on the cart.liquid file which doesn't render the cart drawer (but this might not be on every theme so putting it in your theme.liquid file might be the most universal solution).

 

Let me know if you've had to do this too or if there's a better solution!

0 Likes
New Member
1 0 0

Wow thank you very much. You helped me a lot!

 

Greetings from Germany

0 Likes
New Member
6 0 0

I put this in the theme.liquid file and it didn't fix it. 

 

Is there anywhere else I could potentially place the code that would remove all instances of the express checkout buttons? 

0 Likes