Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save yuriinalivaiko/01d6e4a51134b36ef1e6028413b41ea1 to your computer and use it in GitHub Desktop.

Select an option

Save yuriinalivaiko/01d6e4a51134b36ef1e6028413b41ea1 to your computer and use it in GitHub Desktop.
Customize redirection after the profile is completed in the widget "Ultimate Member - Complete your Profile".
<?php
/**
* Redirection after profile is completed
* Add this code to the file functions.php in the active theme directory.
*/
add_filter( 'um_profile_completeness_complete_profile_redirect', function( $redirect, $user_id, $result ) {
if ( is_array( $result ) && absint( $result['progress'] ) >= absint( $result['req_progress'] ) ) {
$redirect = home_url();
}
return $redirect;
}, 10, 3 );
@yuriinalivaiko
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment