I'm adding a couple of buttons to the user table in a custom column, in which, on click will need to either approve or reject the user via update_user_meta
.
I've tried hooking in with profile_update
, but that didn't seem to work.
I also noticed that the form method is get
, so would the best option here be some admin ajax?
TIA!
wp-admin/users.php
) and for example, you can use theadmin_action_<action>
hook to run the function which would update the meta - the button URL would have?action=<action>&user=<ID>
which contains the action name and user ID.