Hanson has been starting at second base for the Giants in place of the injured Joe Panik, who was placed on the DL with a sprained left thumb on April 28.
Hanson slightly strained his left hamstring Saturday in Pittsburgh. The DL move was made retroactive to Sunday. He is hitting .298 with four home runs and 12 RBIs in 47 at-bats with the Giants this season.
Infielder Austin Slater was recalled from Triple-A Sacramento in a corresponding move. Slater played in the majors earlier this season and was 2-for-10 with three walks in five games.
The Associated Press contributed to this report.