WordPress display name string manipulation

Use PHP’s substr() function:

  $outcome = trim(
    get_user_meta( $user->ID, 'first_name', true ) 
    . ' ' 
    . substr( get_user_meta( $user->ID, 'last_name', true ), 0, 1 )
    . '.'
  );

tech