How To Remove The Paypal Button in Shopify’s Cart Page & Checkout Page

Let me tell you – anyone who is using Paypal Express Checkout with Shopify is complaining about this issue: the sticky Paypal button at the cart page and checkout page.
If you have been looking for a solution around the web, you might actually have been to these Shopify forums posts where no one figured it out and everyone is just annoyed or suggesting to look into another ecommerce solution. But – that is not a good solution since Shopify is the best ecommerce solution in my opinion, it just has this minor quirks which we can fix.
Those forum posts were already 2 years old! And until now that issue still persists: the Paypal button is STILL shown at the cart page and even on top of the checkout page.
This poses a lot of issues – mainly these two things:
- The shipping option is added AFTER the cart page where the customers have already placed their address. Having the Paypal button in the Cart page means the option to choose the shipping is SKIPPED altogether!
- The tax is calculated AFTER the cart page where the customer places their address, since tax is location specific in most applications. Again, the Paypal button is longing to be PUSHED just before the customer places the address, so the tax is skipped altogether.
There is no real way to get rid of the Paypal button on Shopify other than to remove it from your payment options.
There is a paid Shopify app which can actually do this. It’s here and costs $0.99 / month to hide that Paypal button.
That option is available for those who are not comfortable editing code or just sick and tired and just want to click a few buttons to instantly hide the button (Checkout-with-paypal-button-is-ruining-my-business Syndrome).
If you don’t want to spend a couple of cents per month, here’s how you can do it yourself:
To hide the Paypal button in the Shopify cart page:
- In your Shopify admin, navigate to Online Store > Themes
- Under the Actions button on the active theme, select Edit Code
- Now you have access to the code of your theme. In the search box, type in “cart.liquid” and click on that file
- You have now opened the code of the cart page. Paste this code at the very top:
- <style>.paypal-button{display:none !important}</style>
To hide the Paypal button in the Shopify checkout page:
- In your Shopify admin, navigate to Online Store > Preferences
- In the Google Analytics area, under the “Additional Google Analytics JavaScript” textarea – paste this code:
(function(fn){var d=document;(d.readyState=='loading')?d.addEventListener('DOMContentLoaded',fn):fn();})(function(){ document.getElementById("paypal-express-checkout-btn").style.visibility = "hidden"; var hideBtn = document.getElementsByClassName('alt-payment-list-container'), i; for (var i = 0; i < hideBtn.length; i ++) { hideBtn[i].style.display = 'none'; } });
You can now check your Shopify store’s cart page and checkout page and take a coffee break because you now have hidden the persistent Paypal buttons from your store!
Let me know if you are able to do it in your stores! If this helps – share it with other Shopify business owners and become a hero!
Comments
pg
May 19 2020
too bad your system doesn’t work …
Mo
May 19 2020
Help how do you change back to the Buy Now button instead of having PayPal button on the product page?
Mo
May 19 2020
Help how do you change back to the Buy Now button instead of having PayPal button on the product page?
Arturo Treviño
May 19 2020
Hi there, The cart code worked well for me, but the checkout code is not working, even though I followed all the instructions. Do you know any other way to do it?
Thanks.
Jude
May 19 2020
Hi,
I followed your instructions but it did not work for me. I am currently using the Debut Theme with Shopify..
Could it be an issue with my theme?
I will be grateful if you can look into my case.
Regards
Joao Viegas
May 19 2020
It works. Thank you.
Thomas Beaudouin
July 22 2019
It does not work, says elements fetched by your script are null
Theodoros Eleftheriou
July 22 2019
Hi, i used our guidelines in Debut theme and it works fine but only on desktop.
Mobile version still seems to show the Paypal button.
Any other coding for mobile version?
Thanks
Garett
June 27 2019
Hi I thoroughly read these instructions and failed until I got to the java script part and it worked. Thank you heaps :)
Comments
9 Comments