Josh Duhamel will replace Armie Hammer and star alongside Jennifer Lopez in action comedy film Shotgun Wedding, studio Lionsgate has confirmed.
Hammer dropped out of the project last month amid controversy over explicit messages he allegedly sent.
The actor, 34, responded to the allegations by describing them as “vicious and spurious online attacks against me”.
Transformers star Duhamel, 48, will now play Lopez’s husband-to-be in Shotgun Wedding.
Erin Westerman, president of production for the Lionsgate Motion Pictures Group, said: “We know Josh and Jennifer will make a compelling and sexy on-screen couple and they will be fun sparring partners as their dream destination wedding erupts into a memorable nightmare.”
Lionsgate also announced Sonia Braga will play Lopez’s on-screen mother, with Jennifer Coolidge starring as Duhamel’s character’s mother.
Shotgun Wedding will be directed by Pitch Perfect filmmaker Jason Moore and tells the story of a couple who begin to have second thoughts before their wedding.
The situation is further complicated when they are taken hostage by criminals.
Hammer’s estranged wife Elizabeth Chambers appeared to address the controversy over his alleged social media messages with a post on Instagram on Monday.
Chambers, a TV presenter who has two children with Hammer, said: “I support any victim of assault or abuse and urge anyone who has experienced this pain to seek the help she or he needs to heal.”