• Resolved hmcody

    (@hmcody)


    I have included this code to automatically approve users per this documentation: https://docs.ultimatemember.com/article/1650-auto-approve-a-user-on-registration-in-wp-admin

    add_action("um_registration_complete","um_120621_wpadmin_approve_register_user");
    function um_120621_wpadmin_approve_register_user( $user_id ){

    if( is_admin() ){
    um_fetch_user( $user_id );
    UM()->user()->approve();
    }
    }

    When I view my local version of the site in Visual Studio Code, I get a message that ‘approve’ is deprecated.

    I would like to update this code to use the current method, but can’t figure out what that is. Can someone point me to the where this is documented?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.