Home › Forums › Advanced noCaptcha & invisible Captcha PRO › Wordfence 2fact authendiacator › Reply To: Wordfence 2fact authendiacator
February 22, 2020 at 1:28 am
#34665
shamim
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.