pay court to

Solicit the favors or affection of, as in If you want to win the daughter, you'll have to pay court to her mother. [Late 1500s]

The American Heritage® Idioms Dictionary Copyright © 2002, 2001, 1995 by Houghton Mifflin Harcourt Publishing Company. Published by Houghton Mifflin Harcourt Publishing Company.