There is a circuit on logic board that can be replaced; since these go bad
sometimes, and called 'DC-in Board'. The part number is 'build model yr'
specific to the exact macbook series. I'd not had these fail in my macs yet.
However my older 2006 MacBook1.1 (13-inch 1.83GHz) model had battery
failure; troubleshot it, tried reCalibration; SMC reset, then NVRAM too.
Usually a combination of these, to try and reestablish battery charging;
sometimes that helps get older weaker battery to work again for awhile.
A few months, after seeming good, battery went to 0% and green light
'stays on' MagSafe output cable. This indicates need to get new battery.
Ordered one, four days ago from OWC. A 'newer tech' battery; I had to
order different part number, as their stock changed; but its OK.
The OWC company has battery replacement kits (with tools, &
online instruction video, etc) for MB/Pro, MB/Air, and MacBooks.
DC-in Board replacement, if it comes to that, & could be suspect. This
instead of logic board, if so the repair is less expensive, take less time;
could be replaced by tech person with skills; or 'slow careful' worker..
Also instructions may be found online ~ for a look into DIY experience.
Three things could be 'complicit in troubleshooting' charger circuit.
Between: AC adapter, battery, and 'DC-in Board'. To start with larger
external parts, and then work toward smaller, internal ones..
https://duckduckgo.com/?t=ffab&q=macbook+dc-in+board+A1181&ia=web
For those who are able to do it yourself, and be meticulous in detail
for a casual time; about 40 minutes or less. Others may choose to
have Apple trained tech, at independent shop, repair older Mac.
An SMC reset may help; and sometimes NVRAM reset, too. Older Macs
could be testy, given newer instructions for these; & were designed for
use with older re-set instructions. (wow.. this became a ramble!)
Take care & happy computing!🌻|🐝