Title: programmatically create user
Last modified: April 2, 2019

---

# programmatically create user

 *  Resolved [tipytv](https://wordpress.org/support/users/tipytv/)
 * (@tipytv)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/programmatically-create-user/)
 * 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 7 years, 1 month ago by [tipytv](https://wordpress.org/support/users/tipytv/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * (@shamim51)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/programmatically-create-user/#post-11387445)
 * A new filter is added which you can use for this purpose. See [https://github.com/shamim2883/advanced-nocaptcha-recaptcha/commit/f460b850f40831f8e9f28b21c4b9e096c367b540](https://github.com/shamim2883/advanced-nocaptcha-recaptcha/commit/f460b850f40831f8e9f28b21c4b9e096c367b540)
   
   Next version in wp you will get this.
 *  Thread Starter [tipytv](https://wordpress.org/support/users/tipytv/)
 * (@tipytv)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/programmatically-create-user/#post-11387570)
 * Thanks a lot 😀 !!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘programmatically create user’ is closed to new replies.

 * ![](https://ps.w.org/advanced-nocaptcha-recaptcha/assets/icon-256x256.png?rev
   =2961544)
 * [CAPTCHA 4WP - Antispam CAPTCHA solution for WordPress](https://wordpress.org/plugins/advanced-nocaptcha-recaptcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-nocaptcha-recaptcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-nocaptcha-recaptcha/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-nocaptcha-recaptcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-nocaptcha-recaptcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-nocaptcha-recaptcha/reviews/)

## Tags

 * [user](https://wordpress.org/support/topic-tag/user/)

 * 2 replies
 * 2 participants
 * Last reply from: [tipytv](https://wordpress.org/support/users/tipytv/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/programmatically-create-user/#post-11387570)
 * Status: resolved