Add admin settings update and license APIs - #5
Open
syedgalib wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Type
What kind of change does this PR introduce?
Description
Why is this PR needed?
The App Toolkit admin settings endpoint is read-only, does not expose an All Listings layout, and cannot report whether the site has a current Directorist license entitlement. Administrators need to update app configuration through the API, while clients need a boolean entitlement state.
What is done in this PR?
/directorist-app-toolkit/v1/admin-settings.app_layout_all_listingsJSON setting.has_active_licensefield to admin settings responses.How to test the PR
/wp-json/directorist-app-toolkit/v1/admin-settings; confirm only submitted values change and the full settings object is returned.app_layout_all_listingswith a JSON object and confirm GET returns the decoded object; confirm invalid JSON, unknown fields, andhas_active_licenseupdates return400.has_active_license: true.has_active_license: false.Task Links