This has worked fine for the past year or so, but the buttons have now started reappearing in certain scenarios.
Here is a brief description of how we set up the custom code:
Adding the buttons to the cart template. They are present.
Hiding the buttons via css "d-none" class.
Cookies are set by the buttons on the cart page.
Yet, buttons are displayed in the checkout.
We started noticing this last week. Most commonly in incognito browser session, chrome and safari on mobile devices.
I am guessing, this has something to do with cookies. I believe, the checkout checks, wether the accelerated checkout buttons cookies exist in the browser and then displays the buttons. I might be wrong.
Has anyone noticed a change how the buttons behave in the checkout?
Seems like since the mid of 2022, the liquid / CSS code to hide the checkout button does not work anymore. To hide the express checkout payment method, you will need an app that utilize Shopify Functions.
I have made an app to hide the Paypal Express (and other express checkout method like Apple Pay, Google Pay etc) on the top part of checkout page, and customer can still select Paypal method at the payment step.
The app is made using native Shopify Functions, thus it does not affect your store existing layout or functionality at all.
The app also have a workaround which you can hide the express checkout buttons for returning customers with saved address, but you will need to create a placeholder shipping rate for it to work, this will also work with one-page checkout.
Hope this can help!
Spent too much support time dealing with order cancellation request from customer? Wouldn't it be good if customer can cancel order on their own without bugging your support? Try out Cancellable app! https://apps.shopify.com/cancellable . I also write articles about store customization that can improve your customer shopping experience here : Yagi Software Blog