I have added a new custom bulk action to the user listing page called Resend Welcome Email, it is showing and running. What I'm looking to do is fire the Resend Welcome Email plugin's action. I'm struggling to implement this... I have tried to use the add_action call of:

add_action ( 'resend_welcome_email', 20, $user );

But nothing seems to happen. It is possible to fire a plugin's action via this method? Is that how add_action works?

What I'm looking to do is talked about here but I can't figure out how to action what the plugin author is talking about.

Thanks, Adam


I don't think the plugin is helpful for your case, and you can just call the WordPress API yourself directly:

wp_new_user_notification( $user_id, null, 'both' );

This is all the plugin does: get's the user ID from request parameters, verifies the user exists and then calls wp_new_user_notifications (see plugin code here).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.