commonWP
commonWP copied to clipboard
make sure $hook_extra['plugins'] before using it.
We've had some errors that $hook_extra['plugins']
is not set when using it in this function.
It has only been with non WordPress.org plugins, but this should fix it to make sure that it is set before using it.
Also handle if $hook_extra['plugin']
is used to pass a single plugin. A case that I have an example of the $hook_extra
variable contained the following data.
[
'action' => 'update',
'plugin' => 'wpmudev-updates/update-notifications.php',
'type' => 'plugin'
]