Yes. Apple will replace chargers for up to one year, but not ones that are fraying or show signs of wear – at least not for everyone, that is.
Can a frayed cord be replaced?
Cables are cheap; if your power cable looks badly damaged then it's best to just throw it away and buy a new one. ... For power cables that are still in near-perfect condition or cables that don't carry (much) power, you're probably fine to fix your fraying cable and continue using them.
Does Apple have warranty on cords?
Apple cables (including the Lightning to USB cable included with iPhone) are covered under Apple's One Year Limited Warranty against defects in materials and workmanship, but not against accidental damage or damage caused by misuse or using the cable outside Apple's guidelines.