This PR adds a rate limit to the (Re)Configure webhooks button in the admin settings to prevent sending multiple Stripe requests if the merchant keeps clicking the button.
If you click the Configure webhooks button within a minute of the last request, you will see this response.
Testing instructions
Checkout this branch and run npm run build
Go to your Stripe API settings and click the Configure webhooks or reconfigure webhooks button.
You should see a success notice.
Click the button again and you should see the error message regarding the rate limit.
Wait 1 minute and click the button again, the request should be successful now.
[ ] Covered with tests (or have a good reason not to test in description ☝️)
[ ] Added changelog entry in bothchangelog.txt and readme.txt (or does not apply)
Part of #3195 Fixes #3213
Changes proposed in this Pull Request:
This PR adds a rate limit to the (Re)Configure webhooks button in the admin settings to prevent sending multiple Stripe requests if the merchant keeps clicking the button.
Testing instructions
npm run build
changelog.txt
andreadme.txt
(or does not apply)Post merge