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
评论列表(0条)