Thank you @baris! I totally forgot about this. I've included my code for future reference.
$(document).on('click', '.my-class', function() { // do stuff });SOLVED Add server side hooks listeners in runtime?
-
I'm trying to figure this out. Is there a way to add a listener for a server side hook in runtime without adding it to
plugin.json
?Something like
Plugins.registerHook('filter:groups.get', myRuntimeFunc)
.The plugin I'm creating would benefit from this so the user have more control over when data should be fetched from an external API. I believe the answer will be no, but I need to ask.
-
@magnusvhendin said in Add server side hooks listeners in runtime?:
Plugins.registerHook('filter:groups.get', myRuntimeFunc)
This should work. The call is different though use
plugins.registerHook('somePlugin', { hook: 'filter:config.get', method: onConfigGet });
-
@magnusvhendin said in Add server side hooks listeners in runtime?:
Plugins.registerHook('filter:groups.get', myRuntimeFunc)
This should work. The call is different though use
plugins.registerHook('somePlugin', { hook: 'filter:config.get', method: onConfigGet });
-
@baris That's it! Thanks a lot.