[wp-trac] [WordPress Trac] #61610: Hidding the dependency notice + prevent the plugin deactivation only on some case.
WordPress Trac
noreply at wordpress.org
Thu Jul 18 11:33:43 UTC 2024
#61610: Hidding the dependency notice + prevent the plugin deactivation only on
some case.
-------------------------------+---------------------
Reporter: sebastienserre | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.6.1
Component: Plugins | Version: 6.5
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+---------------------
Changes (by costdev):
* keywords: 2nd-opinion has-patch => reporter-feedback
Comment:
Thanks for opening this ticket @sebastienserre!
**Milestone**
If a bug can be established, this wasn't introduced in 6.6. If no bug can
be established, then this is an enhancement. In both instances, this
doesn't appear to be appropriate for a 6.6 minor.
-----
**Why the notice displays**
This notice should only appear when either of the following apply:
1. Dependents are installed, but their dependencies are not installed.
2. Dependents are active, but their dependencies are not active, or are
not installed.
It would appear that you were experiencing the first case. The solution is
to ensure all dependencies are installed. I tested on WordPress Playground
with WordPress 6.5.5 and the notice appeared when a WooCommerce dependent
was installed when WooCommerce wasn't, and disappeared once WooCommerce
was installed, which is the expected behaviour.
If you delete the WooCommerce directory from your current setup, you
should see the notice appear again after refreshing the page. Adding
`reporter-feedback`, pending this check.
-----
**Conditional display of the notice**
I don't currently see a reason to bring conditional display of this notice
into Core, as it seems to be doing what it's designed to do. Happy to
discuss though.
-----
**Bulk Actions**
Bulk Actions were intentionally disabled for plugins utilizing the Plugin
Dependencies feature at this time. Bulk Action support for such plugins
has some complexity that needs to be addressed carefully.
For example, allowing Bulk Deactivation for WooCommerce means also
allowing Bulk Deletion of WooCommerce, as the Bulk Actions dropdown
options apply to all plugins. Adding a `wp_die()` or an admin notice when
a dependency could not be deleted sounds straightforward, but we need to
ensure that we check the plugins in the right order, otherwise
alphabetical order will determine the chance of failure. The list of
considerations continues.
Enhancement work to introduce Bulk Action support for those utilizing
Plugin Dependencies is already planned - aiming to get this in for 6.7 if
we can. This ticket should not address this work, as it should have its
own ticket that establishes historical context and outlines the planned
work. When I get a chance, I'll create the ticket for introducing the Bulk
Action support.
Removing `2nd-opinion` as both points of the ticket's description have
been addressed by the feature team.
-----
**Conditional enabling/disabling of Plugin Dependencies**
Regarding the separate enhancement suggestion of enabling/disabling the
Plugin Dependencies feature based on environment type, that should be
another ticket with its own discussion. Since the feature is about
dependencies (''hard'' requirements), I'd like to see clear use cases for
conditional enabling/disabling outlined for discussion, as I can't
currently see why this should be optional, much like PHP/WP hard
requirements.
Removing `has-patch` as any patch should be on that separate ticket, if
discussion there leads to consensus on conditional enabling/disabling.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61610#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list