-
Notifications
You must be signed in to change notification settings - Fork 330
Closed
Labels
P0High priorityHigh priorityTeam MIssues for Squad 2Issues for Squad 2Type: BugSomething isn't workingSomething isn't working
Description
Bug Description
The Site Kit dashboard makes a fetch request to get the Reader Revenue Manager settings even if the module is not active, which should be avoided.
(Props to @aaemnnosttv for reporting)
Steps to reproduce
- Go to the Site Kit dashboard with the Reader Revenue Manager module not active.
- Monitor the network requests.
- Notice that a
GETrequest to/wp-json/google-site-kit/v1/modules/reader-revenue-manager/data/settingsis made.
Screenshots
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance Criteria
- When the RRM module is inactive, requests to the RRM settings endpoint should not be triggered from the dashboard or any Site Kit screen.
Implementation Brief
- In
assets/js/modules/reader-revenue-manager/index.js, update thecheckRequirementscallback for the following notifications to check if RRM module is active (isModuleActivemethod), if not active, returnfalse.- ProductIDSubscriptionsNotification
- ProductIDContributionsNotification
Test coverage
- Add the test for this change to ensure settings endpoint is not triggered when RRM module is not active.
QA Brief
- Follow the "Steps to reproduce" above
- Verify that no request to get the RRM settings was made
Changelog entry
- Prevent requests to the Reader Revenue Manager settings endpoint from being triggered when the Reader Revenue Manager module is inactive.
Metadata
Metadata
Assignees
Labels
P0High priorityHigh priorityTeam MIssues for Squad 2Issues for Squad 2Type: BugSomething isn't workingSomething isn't working