feat(integrations): add inactive plugin state#4721
Open
chickenn00dle wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Surfaces required plugin status for Audience integrations so admins can see missing/inactive dependencies and activate installed dependencies from the Integrations screen.
Changes:
- Adds a
required_pluginsintegration API contract and includes it in integration settings responses. - Declares Newspack Newsletters as the ESP integration dependency.
- Updates the integrations card UI to show requirements or an Activate action based on dependency status.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/wizards/audience/views/integrations/settings-section.js |
Renders plugin requirement labels and Activate actions on integration cards. |
src/wizards/audience/views/integrations/index.js |
Adds plugin activation API handler and refetches settings after activation. |
includes/reader-activation/integrations/class-integration.php |
Adds base get_required_plugins() method. |
includes/reader-activation/integrations/class-esp.php |
Reports Newspack Newsletters install/active status for ESP. |
includes/reader-activation/class-integrations.php |
Exposes required_plugins in the integrations settings payload. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
e258e82 to
d957f2e
Compare
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
All Submissions:
Changes proposed in this Pull Request:
Surfaces the install/active status of an integration's required plugins on the Audience → Integrations screen so admins can resolve missing dependencies without leaving the page.
Integration::get_required_plugins()so integrations can declare the plugins they depend on. The base implementation returns an empty array;ESPoverrides it to reportnewspack-newslettersinstall/active state viaPlugin_Manager::get_managed_plugin_status().required_pluginspayload on each integration in the wizard REST response.POST /newspack/v1/plugins/{slug}/activatecall followed by a refetch. When a required plugin is not installed at all, the card renders a "Requires …" requirements affordance instead.How to test the changes in this Pull Request:
n build newspack-plugin), and load Newspack → Audience → Integrations in the admin.required_pluginsarray for the ESP integration withslug,name,is_active, andis_installedkeys.required_pluginsarray and unchanged UI.Other information: