Remove PayPal from Checkoutpage only (in combination with Stripe)

[ad_1]

Hi @albarosa

One of the reasons is that PayPal is not compatible with the block-based checkout

That is not correct. This PayPal plugin works with and was coded specifically to support the cart and checkout blocks. There are many merchants using the blocks with this plugin.

if I apply “display: none;” to the class “.wc-block-components-radio-control-accordion-option”, the payment option from Stripe also disappears. 

That’s because CSS written that way will target all selectors that match that query. If you know the ordering of the payment methods you can do something like the following:

.wc-block-components-radio-control-accordion-option:nth-of-type(1){
    display: none;
}

Where (1) would be the index of PayPal.

Kind Regards

Hello @mrclayton,

---> That’s because CSS written that way will target all selectors that match that query. If you know the ordering of the payment methods you can do something like the following:

.wc-block-components-radio-control-accordion-option:nth-of-type(1){
display: none;
}

Where (1) would be the index of PayPal.

1.) Yes, that works. Thank you so much! Is there another way to hide the checkbox or to make the remaining credit card payment method with Stripe appear as if the PayPal plugin were deactivated, without the checkbox? So that customers don't have to click on it again.

2.) How i can find the ordering of the payment methods? In the Inspector? In a file?

---> That is not correct. This PayPal plugin works with and was coded specifically to support the cart and checkout blocks. There are many merchants using the blocks with this plugin.

No, I didn't mean your plugin, because it is fantastic, works perfectly, is by far the best for me, and integrates seamlessly. I meant PayPal itself, because the PayPal button in the checkout makes the entire checkout page and payment button redundant. I mean, if you pay with PayPal, you can just as easily do it in the shopping cart and skip the checkout page altogether, right? Or did I not understand that correctly? I'm new to here/WooCommerce.

On my checkout page (WordPress page), I receive a notification on the right side that PayPal Gateway By Payment Plugins is incompatible with block-based checkout:
https://snipboard.io/b16vlC.jpg
I don't know why this appears, because as I said, your plugin works perfectly and has nothing to do with not wanting PayPal on my checkout page. Clicking on the "Learn more" link leads to the following page: https://woocommerce.com/document/cart-checkout-blocks-status/.

By clicking on "Use a supported payment gateway," you are taken to this page: https://woocommerce.com/document/cart-checkout-blocks-status/#compatible-extensions.

And if you click on "If you use an incompatible extension which has declared its incompatibility," you ultimately arrive at this page: https://developer.woocommerce.com/2023/11/06/faq-extending-cart-and-checkout-blocks/.

It states that "If an extension is a payment gateway, you must follow the payment method integration steps and declare its compatibility."

And now, my question: Do I need to declare compatibility by adding the suggested code to the main plugin file? Or am I completely on the wrong path?

Best regards

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer