Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
At the moment, before loading any functionality related to content syncing, tracking or blocks, we call our
is_configured
utility function. If that function returnsfalse
, we don't load the aforementioned functionality and instead we output an admin notice (though only on the WP plugins screen).The
is_configured
functions checks to see if any settings are blank and if so, returnsfalse
. This means if any settings aren't in place (like the override settings) no functionality gets loaded.This PR fixes this by modifying our
is_configured
function to allow checking of each individual section of settings (collector, automation, override or all). We then utilize this to determine what functionality should be loaded as such:Note: this doesn't change any of the validation, saving or output of error messages on the settings page. Those all remain the same.
Closes #356
Alternate Designs
None
Possible Drawbacks
Should be none but should verify all functionality loads as expected
Verification Process
Add and remove various settings and ensure everything works as expected
Checklist:
Changelog Entry
Credits
Props @dkotter