The presence of a person is a metonym for being able to speak and listen to the person. AT: "wanted to visit Solomon" or "came to visit Solomon" (See: [[rc://en/ta/man/translate/figs-metonymy]])
# to hear his wisdom, which God had put in his heart
The heart is a metonym for what a person thinks, and here it is spoken of as if it were a container. The abstract noun "wisdom" is a metonym for the wise things a person thinks or says. AT: "to hear how wise God had enabled him to be" or "to hear him speak the wise words that God had enabled him to speak" (See: [[rc://en/ta/man/translate/figs-metonymy]])
# which God had put in his heart
God putting wisdom in Solomon's heart represents God making Solomon wise. AT: "which God had given him" or "because God had made him wise" (See: [[rc://en/ta/man/translate/figs-metaphor]])
# year after year
This is an idiom. AT: "every year" (See: [[rc://en/ta/man/translate/figs-idiom]])