woocommerce / woocommerce-gateway-stripe

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

Cart Block : -------OR----- is displayed above the "Proceed to checkout" button even if payments buttons are disabled in Stripe #2088

Closed ghost closed 2 years ago

ghost commented 3 years ago

Describe the bug

When using the Cart and Checkout blocks, "-------OR-----" is always displayed, even if payments requests buttons are disabled in Stripe.

To reproduce

Steps to reproduce the behavior:

  1. Add the cart and/or checkout block to a page, and make sure you have Stripe installed and active;
  2. Disable payments buttons requests in Stripe;
  3. Add a product to cart and proceed to checkout;
  4. Notice that "-------OR-----" is always displayed inside the block.

@AashikP Was able to reproduce the issue on a test environment. Ticket reference: #4252108-zen

Expected behavior

The expected behavior would be to only see the "Proceed to checkout" button without the "-------OR-----", as payment buttons are disabled in the Stripe settings.

Screenshots

https://d.pr/i/Q1ZUMm Full Size: https://d.pr/i/Q1ZUMm

Environment

WordPress (please complete the following information):

mikejolley commented 2 years ago

I've done some debugging and this appears to be a bug in the Stripe extension. With that option disabled, this should return false:

https://github.com/woocommerce/woocommerce-gateway-stripe/blob/8ffd22aff3b06eda02a1ae2fd8368b71450b36a9/client/blocks/payment-request/index.js#L26-L28

But it does not. For some reason, it's not using the correct configuration. As far as Express Payments are aware, Stripe should be available when it's actually not.

I'll transfer this to the Stripe repository.

dougaitken commented 2 years ago

It is possible that this issue has been fixed by a more recent release as I’ve been unable to replicate the issue described using the latest release of the core WooCommerce plugin, WooCommerce Blocks feature plugin, and the WooCommerce Stripe Payment Gateway

As I’m unable to reproduce this, I’m marking this Issue as Closed. Please do open a new one if you are able to reproduce this again.