When you define some event hooks at top level of plugin options, if during the lifecycle you remove it, the state doesn't change the list of listeners and therefore if the event is fired against that hook, the hook is invoked even if the user disabled it.
This happens when you have more than 1 hooks and, after removing some of them, at least one remains in the configuration.
When you define some event hooks at top level of plugin options, if during the lifecycle you remove it, the state doesn't change the list of listeners and therefore if the event is fired against that hook, the hook is invoked even if the user disabled it.
This happens when you have more than 1 hooks and, after removing some of them, at least one remains in the configuration.
See codepen: https://codepen.io/stockinail/pen/dyVRZzY