Last active
July 10, 2022 11:12
-
-
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".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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 ); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gist is a part of the article Profile Completeness - Hooks.
Documentation: https://docs.ultimatemember.com/
Support forum: https://wordpress.org/support/plugin/ultimate-member/
Support (for customers): https://ultimatemember.com/support/ticket/