wpUserId static method

Future<String?> wpUserId()

Returns the user ID of the logged in user

Implementation

static Future<String?> wpUserId() async {
  WpUser? _wpUser = await wpUser();
  return _wpUser?.id.toString();
}