You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix activation error handling when called from install
When activate() is called from install command and the plugin is
already active, activate_plugin() returns WP_Error('plugin_already_active').
This should be treated as success, not failure, since the desired end
state (active plugin) is achieved.
Changes:
- Restructure activation checks to always run force deactivation first
- When chained_command is true and plugin is already active without force,
fall through to activate_plugin() and handle 'plugin_already_active' error
- Treat 'plugin_already_active' as success when called from install command
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
0 commit comments