If a woman belongs to a church of ‘older generation’ members who would look askance at the wearing of pants because they see them as ‘men’s clothing’, then it is better not to wear them in the church. It doesn’t make the older generation right, but it will keep the peace. The principle is this:
1 Corinthians 8:13 Wherefore, if meat make my brother to offend, I will eat no flesh while the world standeth, lest I make my brother to offend.