Here the word "heart" represents the person and his emotions. AT: "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. AT: "stop what he is doing" (See: [[rc://en/ta/man/translate/figs-metaphor]])