Report this Walmart location to your card provider. Their merchant agreement doesn't allow payment friction (e.g, checking an ID). The only thing they're allowed to check is the signature is signed on the back of the card.
Yeah, I don't shop at Target anymore because of something similar. At the target's out here, to buy anything that requires you to be of a certain age (M movies/video games, Alcohol, certain over the counter drugs, etc.) they require that you not only show them your ID, but that you hand it over so that they can scan it. I was like HELL NO, and they refused to sell me the stuff. You want to check my ID, fine, however I am not giving you the right to scan all the info off my license. And oh yeah, because they got hacked and I had to change my cards.. Screw you target!