Jim Herman scored his second PGA Tour victory Sunday. (Alex Slitz/Lexington Herald-Leader via AP)

The time that President Trump devotes to golf paid off over the weekend — for one of his regular partners.

The president called Jim Herman Friday night when Herman, Trump’s frequent playing partner when he was an assistant pro at Trump National Bedminster in New Jersey, took the lead at the Barbasol Championship and had previously suggested that Herman change his putting grip and clubhead. “He gave me a good talking to and told me to use a different style if it’s not working,” Herman said Friday. “So, that was a couple weeks ago and I finally put it into play.”

Playing with a bag emblazoned with “Trump National,” he scored a one-stroke victory over Kelly Kraft with a 26-under 262 at Keene Trace Golf Club just outside Lexington, Ky.

“I’m sure I’ll be receiving some kind of message,” the 41-year-old golfer who lives in Palm City, Fla., said Sunday (via the Courier-Journal). “That was very unexpected to hear from him directly on Friday night. . . . It’s pretty amazing I’ve had this relationship with him. I’m very fortunate I get to play a little golf with him. He inspires me, I guess. I played golf with right before [winning in] Houston [in the 2016 Shell Houston Open], and I played golf with him two weeks ago before this event.”

Encouraged by Trump to give the PGA Tour a try, Herman came up with a win just when it was looking as if he might drop off the tour next year, missing the cut in seven of his previous eight tournaments. The Barbasol win, only his second on the tour, gives him a two-year exemption and a spot in the 2020 PGA Championship in May.

“I think I need to see him again soon,” Herman said. “He motivates me and puts me in a good spot. He puts me in a good spot. I don’t know what it is about him, but he gets me going in the right direction in golf. I took his advice and put a new putter in play and couldn’t have putted any better this week.”

Read more from The Post:

Trump popped in on a wedding at his Bedminster course and a “U-S-A!” chant broke out

Ireland’s Shane Lowry wins British Open in tournament’s return to Northern Ireland

Tiger Woods reportedly will play a skins contest with Rory McIlroy, others in October

Brooks Koepka had a long day at the British Open. Playing with J.B. Holmes didn’t help.