SAN FRANCISCO — Giants third baseman Matt Chapman is scheduled to travel to Philadelphia this weekend to meet with a core specialist to determine if he needs season-ending surgery, manager Tony Vitello said Friday.

Chapman, 33, should know Monday the severity of a hernia and a core muscle tear in his right abdomen. Chapman hasn’t played since he exited after the seventh inning of the Giants’ June 30 game at Arizona.

According to Vitello and Chapman — who spoke with reporters before the Giants’ series opener against the Detroit Tigers — it’s looking as if Chapman’s already played his last game of the season.

“Surgery is probably more likely than not,” Vitello said. “But getting squared away with that doctor in particular, (Dr. William C. Meyers), and be 100 percent sure about what’s the best path.”

Both Chapman and the team had been hopeful he could be back at any moment. A week ago, Chapman, right before he was expecting to return, told reporters about a lingering soreness when running.

But he’s been dealing with the uncertainty of his injury for five weeks now. Chapman said not knowing has weighed on him and he expressed relief in at least being close to an answer.

“It’s nice to know,” Chapman told reporters from his locker in the clubhouse. “It sucks because probably season’s over. I think I’m just disappointed right now for the most part. But I knew something wasn’t right. I knew that this had been bothering me for a while, and for some reason it just wasn’t getting better, and now I know why.”

Chapman is in the second year of a six-year, $142 million contract. In 84 games this season, he hit .235 with seven homers and 42 RBIs. And taking a five-time Gold Glover out of the hot corner left a gaping hole in the Giants’ defense.

Chapman faces an arduous road to recovery, especially for a player known for his agility on defense.

The Giants will continue to lean on the 10-year veteran’s leadership. Chapman, Willy Adames and Rafael Devers are the experienced position players on a team now fully undergoing a youth movement that was launched when president of baseball operations Buster Posey hit the reset button at the trade deadline.

“If that’s the path, it would be the end of his season active on the field,” Vitello said. “But like Willy and Rafi, he’s had things to say to these young guys. He’ll have his rehab stuff to do, but his presence around could help the environment that’s existing right now.”

Vitello and the Giants will likely look to second-year utility player Christian Koss to fill in at third base. Koss has played in 23 games, hitting .167 in those appearances.

Newcomer Osleivis Basabe, who currently is currently handling second base, could also see time at third base down the stretch when Marcelo Mayer debuts. The former top infield prospect the Giants acquired from the Red Sox last week is set to begin an injury rehab assignment at Triple-A, and could soon join the mix.

— Before the game, the Giants announced they had selected the contract of right-hander Trent Harris and optioned righty Tristan Beck to Triple-A Sacramento.

Harris, 27, is set to make his major league debut. He was signed  as an undrafted free agent in 2023 and was 2-1 with a 3.12 ERA in 29 games with the River Cats, almost exclusively as a reliever.

Beck has a 7.07 ERA in 11 games as a reliever and had allowed a run in each of his past three appearances.