Add a custom user meta data on registration based on user email
If this is being run when you register a user, then you could just grab the email used in creating the user as it is contained in the second argument that is passed to user_register which is $userdata. See https://developer.wordpress.org/reference/hooks/user_register/ Note that to provide you with an example that would actually result in something useable, … Read more