You can determine the quest ID from Wowhead, e.g. https://www.wowhead.com/quest=53068/operation-hook-and-line which is 53068.
/script print( IsQuestFlaggedCompleted( 1234 ) )
Learn OOX quest status ∞
was us.battle.net/wow/en/forum/topic/6412974897#5 (not archived)
Tested and works for:
- World of Warcraft 5 (MoP) – 5.0.4
-
World of Warcraft 8 (BfA) – 8.0.1
/run local z,t,s={[836]='The Hinterlands',[648]='Tanaris',[25476]='Feralas'},GetQuestsCompleted();for c,v in pairs(z) do if t[c] then s='' else s=' not' end print('You have'..s,'found OOX in',v) end

Noted a simple way for a particular quest.
Checked OOX for 8.0.1