woocommerce / woocommerce-gateway-stripe

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

Disable WC_Stripe_API::retrieve() on specific pages #2670

Open kimek opened 1 year ago

kimek commented 1 year ago

HTTP API unnecessary calls WC_Stripe_API::retrieve() GET https://api.stripe.com/v1/account on each admin page. Talking average 0.5 seconds Including other HTTP API calls and you have 8 seconds in total of loading just to open 1 order.

Describe the solution you'd like Option to remove it on specific pages

Describe alternatives you've considered Use none blocking javascript

Additional context I was trying to use add_filter( 'http_request_args', 'block_specific_domain', 100, 2 ); and set $parsed_args['blocking'] = false however you are saying that this would cause the issue for Stripe with error message :

Your customers cannot use Stripe on checkout, because we couldn't connect to your account. Please go to your settings and, set your Stripe account keys.

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 4 days ago

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