1 verses of the King James Version have both "please" and "when".
Proverbs 16:7 When a man’s ways please the Lord, he maketh even his enemies to be at peace with him.
In other translations: WEB ASV YLT Darby Webster DRC Geneva