@nojuju
You can try using the “Say What?” plugin and use ultimate-member as the Text domain:
https://wordpress.org/plugins/say-what/
Thread Starter
nojuju
(@nojuju)
Thanks, taking a look! That’s a lot of plugin for just changing one line of text. I was hoping for one good filter, but the ones I have tried using um_add_update_notice , um_wp_form_errors_hook_logincheck and um_custom_error_message_handler did not seem to be correct. I’ll keep digging.
@nojuju
You can try to remove this UM filter and replace with your custom code
for the filter with your own awaiting_email_confirmation message.
/**
* Login checks thru the wordpress admin login
*
* @param $user
* @param $username
* @param $password
*
* @return WP_Error|WP_User
*/
function um_wp_form_errors_hook_logincheck( $user, $username, $password ) {
if ( isset( $user->ID ) ) {
um_fetch_user( $user->ID );
$status = um_user( 'account_status' );
switch( $status ) {
case 'inactive':
return new WP_Error( $status, __( 'Your account has been disabled.', 'ultimate-member' ) );
break;
case 'awaiting_admin_review':
return new WP_Error( $status, __( 'Your account has not been approved yet.', 'ultimate-member' ) );
break;
case 'awaiting_email_confirmation':
return new WP_Error( $status, __( 'Your account is awaiting e-mail verification.', 'ultimate-member' ) );
break;
case 'rejected':
return new WP_Error( $status, __( 'Your membership request has been rejected.', 'ultimate-member' ) );
break;
}
}
return $user;
}
add_filter( 'authenticate', 'um_wp_form_errors_hook_logincheck', 50, 3 );
Thread Starter
nojuju
(@nojuju)
Thank you! While you were sending me that, I also found this, which solves another problem that I had. Thanks for both of them, @missveronica! https://github.com/MissVeronica/um-resend-activation