If hanging a new charger port doesn't fix it then it's an ic problem, this is common fault on iPhone 7.
open