Skip to content

Instantly share code, notes, and snippets.

@cryptexvinci
Created February 28, 2023 05:32
Show Gist options
  • Save cryptexvinci/03f194113296d08aacc9b3747c32a7f1 to your computer and use it in GitHub Desktop.
Save cryptexvinci/03f194113296d08aacc9b3747c32a7f1 to your computer and use it in GitHub Desktop.
Set Profile Privacy = "who can see profile" to Friends only
<?php
/* Set default values for privacy in new accounts
*
* Set Profile Privacy = "who can see profile" to Friends only
*/
add_action("um_registration_complete","custom_um_user_registration_complete", 1);
function custom_um_user_registration_complete( $user_id ){
update_user_meta( $user_id, "profile_privacy", "Friends only");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment