The deal, which is “subject to legislative and governance procedures”, will end chairman Dean Hoyle’s 14-year association with the Terriers.
It will be the 39-year-old's second spell at the Racecourse Ground after a loan stint with the Welsh outfit in 2005. Foster hung up his gloves last year after a distinguished career that included lengthy periods with West Brom and Watford. Wrexham sounded him out about a return to action after losing regular keeper Rob Lainton to injury.
Xavi, Iniesta's former midfield partner at Barca, returned to the club in November 2021 as manager and has turned things around in a spectacular manner. When Xavi took over, Barcelona was languishing in mid-table, but he led the team to a second-place finish last season. Building on that success, the Catalans are currently at the top of the La Liga table this term, with a massive 12-point lead over current champions Real Madrid.