php - Help hooking into user_register

I'm trying to do a POST request to my API when a user is created. I've installed Code snippets and added the

I'm trying to do a POST request to my API when a user is created. I've installed Code snippets and added the following:

add_action('user_register','my_function');

function my_function($user_id){
    echo("Code has been run.");
    echo("<script>console.log('test')");
}

Now, when I register a new user, nothing is echoed. The snippet is set to "Run snippet everywhere".

I hope I've been specific enough.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745547002a4632383.html

相关推荐

  • php - Help hooking into user_register

    I'm trying to do a POST request to my API when a user is created. I've installed Code snippets and added the

    23小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信