The Giants found an easy way to make sure they're slightly better in 2020. They'll no longer have to face Wilmer Flores. 

The infielder has signed a two-year contract with the Giants with a club option for 2022, the team announced Wednesday. ESPN's Jeff Passan first reported an agreement was in place on Feb. 4.

Flores will make $3 million this year and $3 million in 2021. The option year is for $3.5 million, with a $250,000 buyout.

This is the first multi-year deal given out by Farhan Zaidi since he took over as president of baseball operations in November of 2018.

Flores, 28, is a good fit for the roster, and the Giants know all about what he's capable of at the plate. With the Diamondbacks last season, Flores went 14-for-24 against the Giants with three homers and three doubles. Overall, he hit .317/.361/.487 in 265 at-bats. 

While Flores came up as a shortstop with the Mets, he primarily played second base for the Diamondbacks last season. He joins a crowd in the middle of the infield, with Mauricio Dubon, Donovan Solano and Yolmer Sanchez also already in-house as options at second base.

[RELATED: Where 2019 #ForeverGiant players landed this offseason]

Flores also can back up Evan Longoria at third, although his biggest impact may come across the diamond. The Giants have been looking for ways to limit Brandon Belt's exposure to tough lefties, and the right-handed-hitting Flores has over 1,000 big league innings at first base. Flores has a .813 career OPS against left-handed pitchers.