After admitting that it was purposefully throttling some older iPhones in order to conserve battery life, Apple has announced a new program that offers replacement batteries to all customers that may be affected. Here's how you can get one:
Is my iPhone part of the battery replacement program?
If you have an iPhone 6 or later you are eligible to receive a battery as part of the program. The complete list of phones included are: