Reply To: Wordfence 2fact authendiacator


Home Forums Advanced noCaptcha & invisible Captcha PRO Wordfence 2fact authendiacator Reply To: Wordfence 2fact authendiacator

#34665
Shamim Hasan
Keymaster

Add following code in your child theme’s functions.php (untested)

add_filter( 'authenticate', function( $user, $username = '', $password = '' ){
    if ( $user instanceof WP_User ) {
	if ( array_intersect( $user->roles, [ 'administrator' ] ) ) {
		remove_filter( 'authenticate', array( anr_captcha_class::init(), 'login_verify' ), 999, 3 );
	}
    }
    return $user;
}, 990, 3 );

Let me know.