On Aug. 22, Jennifer Garner took her estranged husband Ben Affleck to a treatment center for his third time

Jennifer Garner wanted to enjoy her last few days of summer by spending time with her three children before they head back to school. But on Wednesday, those plans changed as she ended up taking her estranged husband Ben Affleck to a treatment facility in Malibu.

“It’s very stressful for her,” a source tells PEOPLE. “And also devastating for her to have to stage an intervention in the middle of the afternoon, pretty much in public. But this was a crisis situation.”

Though Garner’s kids Violet, 12, Seraphina, 9, and Samuel, 6, remain her top priority, she also “has to take care of Ben and make sure that he gets help,” the insider says.

*EXCLUSIVE* Jennifer Garner and Ben Affleck leave their troubles behind and cast their votes together!
Affleck and Garner in Brentwood, California in 2016.
| Credit: AKM-GSI

The Peppermint star, 46, arrived at Affleck’s Brentwood, California home twice on Wednesday, leaving upset and shaking after the first visit. When Garner returned, she, Affleck and an unidentified woman drove off to the treatment center. On the way, Garner reportedly stopped by a Jack in the Box in the Pacific Palisades.

When they got to Malibu, Garner stayed at the rehab facility for about an hour before driving back home, says another source.

RELATED VIDEO: Ben Affleck Likes to ‘Date Who He Wants and Not Feel Tied Down’: Source

The Justice League actor’s return to rehab comes just one week after Affleck celebrated his 46th birthday with his kids, and three days after he was seen at a Jack in the Box drive-thru with 22-year-old Playboy model Shauna Sexton.

Ben Affleck is seen for the second time in 3 days with Playboy playmate Shauna Sexton as the pair are seen going thru Jack In The Box drive thru in Los Angeles.
Affleck with Sexon at Jack in the Box in L.A. on Aug. 19.
| Credit: T.Maidana/Splash

His first time in treatment came in July 2001, when pal Charlie Sheen drove him to another Malibu facility where Affleck completed a 30-day residential rehabilitation program.

Then over 15 years later, Affleck announced on Facebook in March 2017 that he again “completed treatment for alcohol addiction.”

Now, “Ben understands how serious his situation is,” the first source says. “He wanted to go to rehab.”