0

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?

enter image description here

TIA!

2
  • You can just link the button to the same page (wp-admin/users.php) and for example, you can use the admin_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.
    – Sally CJ
    Commented Nov 6, 2019 at 19:02
  • 1
    It worked! Awesome. Thank you!
    – Jake
    Commented Nov 6, 2019 at 19:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.