wp_set_password( ... )

Updates the user’s password with a new encrypted one.

Parameters:
  • $password string
  • $user_id int