Chosen Solution

MacBook Pro not charging and it goes off once I disconnect from a power source

Your Coconut Battery APP is showing that the battery is not charging and its condition is Poor. The first thing to do would be to replace it: MacBook Pro 13" Unibody Mid 2012 Battery Replacement