Lynda Carter, who starred in the ’70s “Wonder Woman” television series, has been cast in a recurring role in the upcoming season of the CW’s “Supergirl.” Carter is set to play the President of the United States.

Executive producers Greg Berlanti and Andrew Kreisberg teased the casting in March, telling reporters that they had sought to cast Carter for the role last season, but that her schedule wouldn’t allow it. They added that they intended to make the casting happen in the upcoming second season.

Carter played the title superhero on “Wonder Woman” from 1975 to 1979. The show was among the first on television to feature a female superhero.

Carter is represented by managers Jeremy Katz of the Katz Company, Inc. and Dorit Simone of Dorit Simone Management & Productions. Her agent is Bobby Moses of Mavrick Artists Agency.

Carter last appeared on television in a 2013 episode of CBS’ “Two and a Half Men.” She appeared on an episode of “Smallville” in 2007. Her casting follows that of Tyler Hoechlin, who will play Superman in the upcoming second season of “Supergirl.”

Season 2 of “Supergirl” premieres Oct. 10 at 8 p.m. The series migrates to the CW next season after the first season aired on CBS.