Don't show rate limits if the reset time has passed.#356
Conversation
There was a problem hiding this comment.
Code changes look good here.
While not related, both E2E tests and PHPUnit tests are failing because SVN is no longer installed by default in GitHub Actions.
The E2E tests should be fixed once 10up/action-wordpress-plugin-build-zip#8 is merged and a new release is put out.
For PHPUnit tests, we'll need to fix that on our end. Doesn't have to be done as part of this PR (could be a separate PR if you want) but would be great to resolve those. Can see how we fixed this on ClassifAI for an example
E2E tests are fixed now with the upstream release. I've also fixed the PHPUnit tests in #358, so should be good on both once that is merged in |
Description of the Change
In #354, we added an API rate limits widget to display the remaining API rate limits for the user and app. This PR makes a minor improvement by not showing the rate limits if the reset time has passed until the latest data is available.
How to test the Change
autoshare_for_twitter_accountsoption to set the reset time to a past value for one of the user accounts.Changelog Entry
Credits
Props @iamdharmesh
Checklist: