After the user completes a registration form, this form goes through all the validations, the data needs to be inserted into the wp_users table, the function below is playing that role in my THEME:
$user_id = wp_insert_user( apply_filters( 'noo_create_user_data', $new_user ) );
So far so good, but a new column (user_cnpj) has been created in the table and it is necessary for the user-entered CNPJ to be registered in that field.
What would be the best way for me to store this data correctly?
Note: The user_cnpj field currently exists in the table, but the record is being stored as NULL , because of wp_insert_user
, the other fields are saving the fields correctly.