Is a way to configure windows or at least the windows media player to auto stop playing when the headphone is unplugged from the jack ?
I am assuming your headphone jack is onboard your computer, and not onboard some external speakers. So my answer reflects that. If the jack is on the speakers, then there's definitely no way to do it. Anyways...
WMP isn't designed to do what you want, but here's something you can try: