Chosen Solution

Hello, I have an iPhone 6s plus which has both the battery and the lighting connector replaced, when I charge, the phone randomly stops charging. I’ve even bought a new cable and charger and I still get the same problem. (the battery was changed about 2 months ago and I didn’t have this problem until now)

If a new battery and charge port still don’t resolve the issue, then you either have faulty replacement parts (possible) or a logic board issue. There is an IC (commonly referred to as Tristar) responsible for communicating with the charging device and uncertified chargers can damage it. Unplug the battery and connect a known-good (preferably Apple original or MFi) charger to the phone. A properly working phone will show an Apple logo and boot loop. If the Tristar IC is bad then the phone will not do anything.