Walmart has made good on its pledge to eliminate the Confederate flag from its stores, even going as far as to refuse to make a cake featuring the flag.

But now the retail giant has apologized because after refusing the Confederate flag, one employee put the Isis flag on a cake for a Louisiana man, ABC News reported.

Chuck Netzhammer asked Walmart to make a Confederate flag cake adorned with the words, “Heritage Not Hate”, but was refused. So he went back to the store at some point later and was made a cake with the black battle flag of the Islamic militant group.

“I went back yesterday and managed to get an Isis battleflag printed. Isis happens to be somebody who we're fighting against right now who are killing our men and boys overseas and are beheading Christians,” Mr Netzhammer said in a video posted to Youtube.

“That's an Isis battleflag cake that anybody can go buy at Walmart. But you can't buy a Confederate flag toy, with like, say, a 'Dukes of Hazzards' car.”

Walmart was one of several companies that announced last week they would no longer sell products featuring the Confederate flag after the shooting at a Charleston church that left nine black parishioners dead at the hands of a white gunman.

”We never want to offend anyone with the products that we offer,“ Walmart said in a statement last week as it announced the ban. ”We have taken steps to remove all items promoting the Confederate flag from our assortment — whether in our stores or on our web site.“

After Mr Netzhammer revealed the Isis cake, a Walmart spokesman told ABC News, ”An associate in a local store did not know what the design meant and made a mistake. The cake should not have been made and we apologize.“