I had this problem, !! here is my story...
I bought a laptop on eBay just an old clunker but a nice machine.. so I updated the system to Yosemite and transferred my data from my iMac.. all seamed OK. I had it plugged in most of the time so I can't remember how it charged.. then I decided to buy a new battery, just because it was old so I get a new battery from eBay.. and updated to el captain.. now the laptop won't charge and slowly worked its way to 0%.. so I figured it was because it was an after market battery..bugger.. anyway i sent it back and bought an Apple battery, came with 50% charge... still no charging!! made its way to 0% as well.
OK it must be the laptop, send this battery back too, find the old battery in the trash, and sell the whole thing for parts on eBay.. Yes I lost a few hundred bucks here....But I still need a laptop.. so back on eBay.. I found a Nice macbook pro.. a fair bit more money but I need it.. so I upload el Capitain and transfer my data.
Same problem... Not charging!! and this is completely different machine!!
I should mention that I did all the resets and suggested solutions nothing worked on either machine. Just won't charge,
So I figured its probably not El Captain or there would be more references to it.. so it must be my data thats corrupt. Before I re install everything one step at the time I just try the guest user account, so I restart and log in as guest... now suddenly the charger is orange... so I log out and in as My self... still orange, and the menu says charging, it has charged its way to 100% and is happily sitting there. I have learned a lot in this process, first.. never assume..
a new user account can fix many problems.. I once had a printer that would crash photoshop constantly, and I fixed it by creating a new user!!
If your battery isn't charging, just try and restart and log in as guest... what do you have to loose??
Peter
PS. Get coconut battery app... its great for troubleshooting!