Last active
October 30, 2020 22:35
-
-
Save rvanweerd/2ae27152c01f0977bd74f6bcfd0ad92a to your computer and use it in GitHub Desktop.
RCP - redirect to please verify page instead of error message
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
| function my_replace_message_with_redirect() { | |
| $user = get_current_user_id(); | |
| if( rcp_is_pending_verification( $user ) ) { | |
| $location = 'https://www.mysite.com/please-verify-your-email-address/'; | |
| echo("<script>location.href = '" . $location . "'</script>"); | |
| } | |
| } | |
| add_filter( 'rcp_restricted_message', 'my_replace_message_with_redirect', 9999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment