woocommerce / woocommerce-gateway-stripe

The official Stripe Payment Gateway for WooCommerce
https://wordpress.org/plugins/woocommerce-gateway-stripe/
237 stars 207 forks source link

Filter to hide the Apple Pay button on the cart page #2616

Open wessiack opened 1 year ago

wessiack commented 1 year ago

Is your feature request related to a problem? Please describe. We need to hide the Apple Pay button for our B2B customers on product detail AND cart page. But the Apple Pay button must work for our B2C customers.

Describe the solution you'd like We can use a filter in functions.php to detect if the user is logged in as a B2B user and then hide the Apple Pay button with your filter: wc_stripe_hide_payment_request_on_product_page boolean on the product detail page. But there is no such filter for the cart page!

Describe alternatives you've considered Doing a workaround via CSS does not work because via CSS we didn't find a solution to detect if the user is logged in as a B2B user.

Additional context Add any other context or screenshots about the feature request here.

Babylon1999 commented 1 year ago

Hello @wessiack,

Upon checking the plugin files, there is actually a filter for the cart page it just hasn't been added to the documentation.

It was introduced here: https://github.com/woocommerce/woocommerce-gateway-stripe/pull/1236

Sorry for the confusion I may have caused earlier via email. :‎)

Cheers!

github-actions[bot] commented 1 month ago

Hi, This issue has gone 150 days (5 months) without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest version, you can help the project by responding to confirm the problem and by providing any updated reproduction steps. Thanks for helping out.

github-actions[bot] commented 2 weeks ago

This issue has gone 180 days (6 months) without any activity.