You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prevent Stripe API calls after detecting the API keys are not valid (401 response from API) (#4323)
* Add transient to prevent api calls after getting a 401 response
* Update includes/class-wc-stripe-api.php
Co-authored-by: daledupreez <[email protected]>
* Update error response to empty json
* Remove invalid transient when saving new keys
* Refactored to use get_option/update_option for concistency with how we save similar data for onboarding and webhooks stats
* Update code comments
* Update account not connected notification message
* Show account as disconnected if the account data is not valid
* Refactor 401 response to be null (needed for the Configure connection modal)
* Clear account cache after detecting a 401 response
* Add tests
* Simplify option keys in test
* Fix success response mock
* Add changelo entry
* Apply suggestions from code review
Co-authored-by: daledupreez <[email protected]>
---------
Co-authored-by: daledupreez <[email protected]>
"Seems like the test API keys we've saved for you are no longer valid. If you recently updated them, use the <strong>Configure Connection</strong> button below to reconnect.",
136
+
"We couldn't connect to your account, it seems like the test API keys we've saved for you are no longer valid. Please use the <strong>Configure connection</strong> button below to reconnect.",
137
137
'woocommerce-gateway-stripe'
138
138
)
139
139
: __(
140
-
"Seems like the live API keys we've saved for you are no longer valid. If you recently updated them, use the <strong>Configure Connection</strong> button below to reconnect.",
140
+
"We couldn't connect to your account, it seems like the live API keys we've saved for you are no longer valid. Please use the <strong>Configure connection</strong> button below to reconnect.",
0 commit comments