Your post didn't give any details, so I'm guessing you were dressed in guy-mode, you went through checkout with some panties, and the clerk made fun of you.
I'm not a big fan of WalMart, but I think you just ran into an ass of a clerk. Unfortunately, you can run into them anywhere, in any store. The good news: they're not common; most clerks don't give a damn.
However ... if you can be objective ... were you sending any 'make fun of me' signals? For example, were you obviously scared, defensive, ashamed, embarrassed, nervous, etc? That doesn't excuse the clerk's behavior. Not for an instant! But if you project that kind of attitude, it's more likely that you'll bring out the worst in a clerk. That's like a guy going to a seedy bar, getting plastered, and flashing a gold Rolex and a big roll of 100's as he pays his tab. He's just asking to be mugged by the locals. That doesn't make it any less of a crime, but the guy could have prevented it by being more careful.
The solution (other than waiting for a world in which everyone is kind and gentle) is to avoid projecting that attitude. You have every right to buy those panties. Don't act ashamed or embarrassed.
Yes, I know that's easier said than done.