Apple’s become a bit hard and fast with discontinuing service parts for certain models. The Early / Late 2011 era machines especially so.
(The repair extension program for video issues ended on December 31st, 2016 and the supply of service parts was discontinued one day later on January 1st, 2017. Guess they decided they were tired of fixing them. Resulted in a lot of consumer law claims when replacement boards started failing 6 months later too.)
Somewhat frustrating is the fact that these batteries are still available from Apple. You just can’t order one because your machine is classed as a vintage product.
For a 15", it’s part number 661-04563, interchangeable between the MacBook Pro (15-inch, Early 2011), MacBook Pro (15-inch, Late 2011) and MacBook Pro (15-inch, Mid 2012) models.
For a 13", it’s part number 661-04559, interchangeable between the MacBook Pro (13-inch, Mid 2010), MacBook Pro (13-inch, Early 2011), MacBook Pro (13-inch, Late 2011) and MacBook Pro (13-inch, Mid 2012). I believe it’s possibly also compatible with the 13" 2009 models too.
My recommendation would be to contact some Apple service providers - not Apple Stores - and see if they can offer a battery replacement. Otherwise retailers like MacFixit Australia sometimes sell aftermarket and used genuine batteries.
I may even have some good condition genuine batteries for that model around here still, but I’d have to check, and shipping loose batteries is sometimes a bit difficult depending on couriers and shipping regulations.