The case of the chocolate cake slur, it seems, was simply a hoax.

An openly gay Texas pastor who had accused Whole Foods of defacing his cake with an anti-gay slur dropped his lawsuit against the grocery chain on Monday, issuing an apology that said he was wrong to “perpetuate this story.”

“The company did nothing wrong,” the pastor, Jordan Brown, said in a statement. “I was wrong to pursue this matter and use the media to perpetuate this story.”

He also apologized to the lesbian, gay, bisexual and transgender community “for diverting attention from real issues.”

Whole Foods had forcefully rejected the accusations by Mr. Brown, 31, who claimed that he had bought a frosted cake from a store in Austin, Tex., and asked that the words “Love Wins” be written in icing on top — only to discover while driving away that a slur had been added.