Correct translation of a Hadith regarding stray thoughts

Q: I wanted to know that if this Hadith talks about every kind of evil unwanted thoughts that come into mind and a person resists it or just related to religion?

Narrates Abdullah bin Abbas that, once, a person came to the Prophet and said, “Sometimes such wicked ideas come to my mind that I would prefer to be burnt down and reduced to charcoal than to give utterance to them.” The Prophet replied, “Praise be to Allah who turned back the matter towards thought sentiment.”

Selling wigs

Q: Is it allowed to sell human hair as wigs as well as plastic hair as wigs which is sold in cosmetic shops. I understand that there is some fatwa regarding it but to my understanding the Hadith states that we cannot sell it or wear it. Please clarify the matter.