I have hooked an ajax call for a logged-in user, and now I need to catch his data inside the receiving call (the code that receives the action call). How can I get the user’s ID reliably? This code is inside my plugin definition file and the code inside the function (error_log(“we’re in….kind of”);) is being called:
add_action( 'wp_ajax_create_team', 'create_team' );
function create_team() {
error_log("we're in....kind of");
}
}