In the high-profile match, which kicks off at 7pm local time and is set to be televised around the world, the club will take on a selection of Major League Soccer's best players. These will be chosen from the 14 participating clubs, under the name of the MLS All-Stars and could potentially feature LA Galaxy and England's David Beckham.
Hammers chief Scott Duxbury said: "It is an honour to be taking part in the MLS All-Star Game this July. The club has a strong global fan base and we are working hard to increase our international exposure as well as help the game develop at grassroots level across North America. Our players are all looking forward to the challenge. It will be a great experience both for the established names in our squad and our talented youngsters. We are sure it will be a competitive and memorable occasion."