The forward made 21 appearances for Bolton in League Two and his performances were convincing enough to earn a permanent deal.
Afolayan has thanked the Hammers for the time he spent with the club and expressed his delight with his move to Bolton.
“I want to thank all the staff at the Academy and the Club for giving me the opportunity in professional football. I’ve learnt a lot, had my ups and downs, and developed into the man and player I am today,” Afolayan told the club website. I want to thank Dmitri [Halajko], Pottsy (Steve Potts) and all the backroom staff with the team for helping me over the last few seasons, Konch (Paul Konchesky) for helping while I’ve been on loan and all the staff at Chadwell Heath and Rush Green for all the hard work they put in for us every day!