Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Laurent DUREAU

Hook not triggerd when bulk adding/removing role

The new feature which allow to bulk add/remove a specifique role does not trigger the add_user_role and remove_user_role hooks. Which prevent some automation plugins to work.

2 years, 4 months ago
Laurent DUREAU

Just find that the problem come from Email Subscriber because they only listen to user_role_set and not to both user_role_set, add_user_role and remove_user_role hooks.

2 years, 4 months ago
Stefan van den Dungen Gronovius
Developer

Correct, depending on the bulk action you choose, we run the add_role, set_roles, or remove_role methods on the users. I believe this is exactly what should happen and the code for Email Subscribe should be changed. As a workaround, you could use the following hook that is fired after the value is saved and just trigger the hook ‘user_role_set’ yourself.

https://github.com/codepress/admin-columns-hooks/blob/master/acp-editing-saved.php

2 years, 4 months ago

You must be logged in to reply to this topic.