Here is a woe to them whom all men speak well of, that is, who make it their great and only care to gain the praise and applause of men, who value themselves upon that more than upon the favour of God and his acceptance (v. 26): "Woe unto you; that is, it would be a bad sign that you were not faithful to your trust, and to the souls of men, if you preached so as that nobody would be disgusted; for your business is to tell people of their faults, and, if you do that as you ought, you will get that ill will which never speaks well. The false prophets indeed, that flattered your father in their wicked ways, that prophesied smooth things to them, were caressed and spoken well of; and, if you be in like manner cried up, you will be justly suspected to deal deceitfully as they did." We should desire to have the approbation of those that are wise and good, and not be indifferent to what people say of us; but, as we should despise the reproaches, so we should also despise the praises, of the fools in Israel.
When all men shall speak well of you - When they shall praise or applaud you. The people of the world will not praise or applaud "my" doctrine; they are "opposed" to it, and therefore, if they speak well of "you" and of "your teachings," it is proof that you do not teach the true doctrine. If you do "not" do this, then there will be woe upon you. If men teach false doctrines for true; if they declare that God has spoken that which he has not spoken, and if they oppose what he "has" delivered, then heavy punishments will await them.
[Excerpt from Matthew Henry's Full Commentary & Barnes' Notes]