The Costa Rica striker has also terminated his contract with parent club FC Sion in Switzerland in order to return to his homeland for family reasons.
"Alvaro's had problems at home and it's been so bad for him that he's asked to cancel his deal here and end his time with FC Sion as well," manager Gary Johnson told the club's official website.
"I don't know what the situation is with his family but it certainly affected his training and he lost his form. He became a shadow of himself and if you're not mentally up for the Championship then it stands out like a sore thumb.
"It must be a big problem to cut your career short and return home."