The incident happened at the location on FM 528.
Friendswood Police Department said the detective was dressed in plain clothes Thursday morning with a gun on his side and a badge clearly visible next to it.
According to police, the detective tried to explain to the manager on duty that he was a law enforcement officer, but the manager didn't budge.
Police said the detective left before anything escalated.
As of Friday, Whataburger representatives have spoken to the detective and apologized.
Whataburger released a new statement to Eyewitness News on Friday morning:
This was an unfortunate misunderstanding of our open carry policy, and we've talked to the detective to make this right. He was understanding, accepted our apology and said he plans to come back to Whataburger. Our company policy allows law enforcement with proper identification to open carry at our restaurants, and we'll be reinforcing this policy with employees through additional training. We've also been in contact with the Friendswood Police Officers Association. We want to make it clear that this detective and all law enforcement are welcome in our restaurants and we're proud to serve them.
WATCH: Social media response to Whataburger's misunderstanding