Could be this one:
https://github.com/esoui/esoui/blob/...ayer.lua#L1981
PLAYER_TO_PLAYER is the global and the function would e.g. be:
https://github.com/esoui/esoui/blob/...ayer.lua#L1850
ShowPlayerInteractMenu(isIgnored)
To get the target's character and displayname you can use:
Lua Code:
local currentTargetCharacterName = self.currentTargetCharacterName
local currentTargetCharacterNameRaw = self.currentTargetCharacterNameRaw
local currentTargetDisplayName = self.currentTargetDisplayName
where self is PLAYER_TO_PLAYER
But PLEASE: Do NOT override this function but just use a ZO_PreHook or SecurePostHook (called after original code then) instead.
If you want to suppress the menu to show a ZO_PreHook could be used, do your checks and if the menu should not be shown return true then so the original func won't be called anymore.