James Wolk is set to play gay on the ABC Wednesday night comedy Happy Endings.

The 26-year-old Wolk starred as Robert Allen, a Texas con-man who leads a double life as husband to one woman and boyfriend to another, in the quickly canceled Fox drama Lone Star. He also played Will Olsen in 2010 comedy film You Again.

“James Wolk is going to be on our show for a few episodes,” Happy Endings producers tweeted to their more than 5,300 followers. “This is news. Treat it as such!”

TVLine.com is reporting that Wolk will be playing the former and new boyfriend of Max, the show's non-stereotypical gay character played by Adam Pally.

Wolk “will appear in multiple episodes of the buzzy ABC comedy playing Max's old new boyfriend,” the site reported. “That's right, he's a guy Adam Pally's scene-stealing character used to date and is now dating again.”

Last season, Max Greenfield guest starred on the show to date Max for one episode.

(Related: Adam Pally, Larry Wilmore share awkward kiss on Happy Endings.)