Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Disable Express Payment Options in the Checkout

Solved

Disable Express Payment Options in the Checkout

nichharp
Shopify Partner
20 4 19

I'm looking into hiding the express payment buttons from the Checkout using Checkout Extensions. We had a solution to do this using Checkout.liquid but with that being deprecated we're looking into other solutions.

 

nichharp_0-1717654740481.png

 

So far we've tried:

  1. Adding `{{ content_for_additional_checkout_buttons }}` into the core site (this doesn't seem to affect the Checkout anymore)
  2. Using the Hide Operation function. This however did not work as we wanted because (for example) Paypal has the same ID as the Paypal Express option, meaning you could not turn off one without turning off the other. We had some ideas about toggling the on/off state when the user gets to a certain point in the checkout but this caused CLS and it wasn't a preferred option.

 

Shopify Support cannot support this directly and have no solution in their dev guides. We did find this app but it seems to do option #2 so this isn't ideal.

 

If anyone has any advice on this or any ideas I would be grateful!

Accepted Solution (1)

nichharp
Shopify Partner
20 4 19

This is an accepted solution.

Shortly after posting this we found the solution in the latest API version 2024_07.

Using the PaymentCustomizationPaymentMethod and the placements field. You are able to hide the "acceleration checkout" options with:

    return {
        operations: [
            {
                hide: {
                    placements: [PaymentCustomizationPaymentMethodPlacement.AcceleratedCheckout]
                }
            }
        ]
    }

No more need for 3rd party apps or hacky code. This will do it.

View solution in original post

Replies 7 (7)

nafeeur10
Shopify Partner
21 0 1

This app could help you.
https://apps.shopify.com/payrules-conditional-payment-methods 

Please let me know if it works by giving it a like or marking it as a solution!
Working as Technical Lead at Zepto Product Personalizer
If you need any help, mail me at inafeeur [at] gmail.com or Give me a text message on Skype nafeeur.rahman1

store-crafters
Shopify Partner
24 1 2

Hey,

To disable Paypal express checkout go to Settings -> Payments -> Deactivate Paypal

After deactivating paypal the express checkout gets removed from checkout automatically, 

P.S. if it helps you, do leave a like 🙂

nichharp
Shopify Partner
20 4 19

This is an accepted solution.

Shortly after posting this we found the solution in the latest API version 2024_07.

Using the PaymentCustomizationPaymentMethod and the placements field. You are able to hide the "acceleration checkout" options with:

    return {
        operations: [
            {
                hide: {
                    placements: [PaymentCustomizationPaymentMethodPlacement.AcceleratedCheckout]
                }
            }
        ]
    }

No more need for 3rd party apps or hacky code. This will do it.

maks-afew
Shopify Partner
8 0 2

This is the best! Thank you! I've seen the new placements field but didn't figure out that we can use it for this

andresliebrecht
Visitor
1 0 0

Can you show me where to place this code please? no idea from coding

nichharp
Shopify Partner
20 4 19

Hi Andresliebrecht,

I'm not going to lie, this is a bit more complicated that just placing the code somewhere. 

You'll need have a "Partners Portal" to set up a new App and create a "Shopify Function". There are docs and tutorials to assist: https://shopify.dev/docs/apps/build/functions. As well as lots of tutorials on youtube.

 

However if you don't have access to a portal or you're not up for the coding challenge there might be a developer that you can reach out to to assist you.

jpllosa
Shopify Partner
1 0 0

Yep. As Nichharp says it's a bit more complicated than just placing the code somewhere. Here's an example of how to hide the Paypal Express button, https://jpllosa.blogspot.com/2024/08/shopify-function-extension-example.html, if you want to learn more about it in detail.