• Resolved tipytv

    (@tipytv)


    Hi ??

    I have an issue with this plugin, i need sometimes to programmatically create a user with this woocommerce function : wc_create_new_customer().
    I use it because i need to automatically create the username, the password, and send an email to the user with his password generated, and this function do all the job.

    Of course, the creation failed because your plugin will check the re-captcha.

    Could you add a filter so we can force the re-captcha verification to be true ?

    Current code on anr-captcha-class line 329 :

    
    function verify() {
        $loggedin_hide = anr_get_option( 'loggedin_hide' );
    
        if ( is_user_logged_in() && $loggedin_hide ) {
            return true;
        }
    
        return anr_verify_captcha();
    
    }
    

    The change i need :

    
    function verify() {
        $check = apply_filters('anr_verify_captcha', true);
        if ($check) {
            $loggedin_hide = anr_get_option( 'loggedin_hide' );
    
            if ( is_user_logged_in() && $loggedin_hide ) {
                return true;
            }
    
            return anr_verify_captcha();
        }
    
        return true;
    }
    

    Is this possible ?

    • This topic was modified 5 years, 11 months ago by tipytv.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘programmatically create user’ is closed to new replies.