The former England international had the operation on his right ankle earlier in the week and the club said on their website (www.qpr.co.uk) that he would play no further part in their battle to escape the drop.
The 31-year-old missed Monday's 3-2 defeat at Fulham that left the West London side seven points from safety and ahead of bottom club Reading only on goal difference with seven matches remaining.
Wright-Phillips, who scored a rare winner at Chelsea in January, last played for QPR as a substitute in the 3-1 victory over Sunderland on March 9. QPR host fellow relegation strugglers Wigan Athletic at Loftus Road on Sunday.
"Shaun has had an operation," manager Harry Redknapp told the website. "It needed doing, we tried to keep him going.
"He's played with the pain and not felt 100 percent. He couldn't train or play to his maximum. The pain was too much and he will hopefully be back at the start of next season now.
"We had wanted to try and keep him going but he couldn't carry on. When he has played he has done well but I don't think he felt he was capable of given his maximum."
- Sports & Recreation