Here the word "heart" represents the person and his emotions. Alternate translation: "discourage the righteous person" (See: [[rc://en/ta/man/translate/figs-synecdoche]])
To stop doing something is referred to as turning in a different direction. Alternate translation: "stop what he is doing" (See: [[rc://en/ta/man/translate/figs-metaphor]])