How to conditionally hide express checkout options

[ad_1]

In my website, I have a variety of different required custom fields on the checkout page however, a customer can simply skip all of these by paying with an express checkout option (Google Pay/ Apple Pay). Because of this, I would like to be able to hide these express checkout buttons on the checkout page when a specific product is inside of the basket.

I could easily do this using CSS but this doesn’t feel like the most effective solution. I discovered that it is possible to remove these buttons using this hook wc_stripe_hide_payment_request_on_product_page however, this only applies to the product page and I was unable to find one specifically for the checkout page. Is there a specific hook that I have missed that could be used?

Many thanks.

 

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