Fonseca has enjoyed an excellent two years with Shakhtar, winning back-to-back league titles and leading the club into the last 16 of the Champions League.
The Hammers allegedly held talks with Fonseca earlier this week but it has now been revealed that fresh terms have been agreed with Shakhtar.
Fonseca told the club's official website: "I'm very happy. I had a desire to continue my career at Shakhtar. It was absolutely important to feel that the club president Rinat Akhmetov, the employees and the footballers want me to stay, to continue the job that we started two seasons ago.
"Again, I'm really happy to have extended the contract with the Donetsk club. I also want to thank my agent Marco Abreu, who played an important role in the negotiations."
Everton have also been previously linked with an approach for Fonseca.