• Resolved roberr02

    (@roberr02)


    How to automatically accept new instructors? The way is now I need manually to accept each new instructor.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Md. Jobayer Al Mahmud

    (@jobayertuser)

    Hello @roberr02,

    Most of the users don’t want to directly make any user any instructor that’s why we didn’t have this option to make any user directly instructor without reviewing the application. The alternate you can do is now create an instructor from the admin panel.

    Hello @roberr02,

    You can apply the code snippets given below from your active theme’s functions.php file to autoapprove new instructors

    
    add_action('tutor_new_instructor_after', 'approve_new_instructor_immediately');
    /**
     * @param $instructor_id
     *
     * Immediately approve instructor after register
     */
    
    if ( ! function_exists('approve_new_instructor_immediately')){
        function approve_new_instructor_immediately($instructor_id){
            update_user_meta($instructor_id, '_tutor_instructor_status', 'approved');
            update_user_meta($instructor_id, '_tutor_instructor_approved', tutor_time());
    
            $instructor = new \WP_User($instructor_id);
            $instructor->add_role(tutor()->instructor_role);
        }
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to automatically accept new instructors?’ is closed to new replies.