Deer Park police responded to the Walmart in the 9000 block of Spencer Highway around 11 a.m.
Police say they watched surveillance video and arrested the 30-year-old Aurelio Medina for indecent exposure.
A grandmother, who only wanted to be identified as Danielle, took a photo of Medina and sent it to her daughter to contact police.
She said Medina was exposed in the children's clothing section.
"I just took his arm and I said, 'You're exposing yourself. You need to put it away, right now!'"
Danielle said Medina blamed a faulty zipper for being exposed.
"I was floored that he would say something so ridiculous," she added.
Medina told ABC13's Steve Campion that he didn't realize his zipper was down.
"It was an accident," he said.
Walmart released the following statement to ABC13:
"The safety and well-being of our customers and associates is always a top priority. We are appalled at what happened and grateful for the assistance and quick response of local law enforcement."
"You need to put it away right now!" This Grandmother confronted a man inside a Texas @Walmart. She said he was exposing himself in the children's clothing section. She snapped a photo. Police arrested the 29 year old man. Read more -> https://t.co/MXTMQPHUhm. #abc13 #hounews pic.twitter.com/YNctBGx9FN— Steve Campion (@SteveABC13) July 1, 2018
Follow Steve Campion on Facebook and Twitter.