[wp-trac] [WordPress Trac] #65099: Fix: Only auto register settings if the plugin the connector references is installed and active
WordPress Trac
noreply at wordpress.org
Tue Apr 21 09:06:18 UTC 2026
#65099: Fix: Only auto register settings if the plugin the connector references is
installed and active
--------------------------------------+---------------------
Reporter: jorgefilipecosta | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 7.0
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Comment (by jorgefilipecosta):
Hi @iamadisingh, thanks so much for your work on this! Unfortunately, I
don't think we can go with the approach in https://github.com/WordPress
/wordpress-develop/pull/11565. is_plugin_active isn't something we should
be calling in REST API requests, for example. I've actually been handling
this over in #11564.
What do you think about reverting your PR to just include the is_active
callback addition as before? That approach was working well and was good
to go, and then we could land your PR alongside #11564. Would that work
for you?
Thanks again for the help here! 🙏
Replying to [comment:1 iamadisingh]:
> Hi @jorgefilipecosta, updated PR https://github.com/WordPress/wordpress-
develop/pull/11565 to address this issue.
>
> `_wp_register_default_connector_settings()` now checks whether the
owning plugin is active before registering the `api_key` setting for non-
AI connectors. Uses the `is_active` callback if provided, falling back to
`is_plugin_active()`. If neither confirms the plugin is active,
registration is skipped.
>
>
Replying to [comment:1 iamadisingh]:
> Hi @jorgefilipecosta, updated PR https://github.com/WordPress/wordpress-
develop/pull/11565 to address this issue.
>
> `_wp_register_default_connector_settings()` now checks whether the
owning plugin is active before registering the `api_key` setting for non-
AI connectors. Uses the `is_active` callback if provided, falling back to
`is_plugin_active()`. If neither confirms the plugin is active,
registration is skipped.
>
>
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65099#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list