最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - New bulk action to resend welcome emails

programmeradmin8浏览0评论

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 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

Share Improve this question edited Feb 14, 2020 at 12:59 apalin asked Feb 14, 2020 at 11:52 apalinapalin 155 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

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).

发布评论

评论列表(0)

  1. 暂无评论