The surgery is expected to sideline Longoria between six and eight weeks, but Longoria told reporters he "wants to beat that estimate," per Haft.
The Giants acquired Longoria from the Tampa Bay Rays during the offseason, hoping he would be able to provide a boost to their lineup.
Longoria's transition to the National League has been bumpy to this point. The 32-year-old is hitting .246/.278/.434, and his .711 OPS is the lowest of his career.
Giants manager Bruce Bochy will turn to Pablo Sandoval at third base in the interim. The Kung Fu Panda is having a strong rebound season with a .281/.348/.455 slash line.
San Francisco (34-36) is hovering around .500 and is still squarely in the NL West race, currently led by the Arizona Diamondbacks with a 39-30 record.