This will happen when the cable becomes damaged. It may seem fine and still transfer data and all of that, but I think if you were to try another cable you see a difference. Hopefully it is the cable and not the port... You could try compressed air, perhaps it's just dirty and not making a good connection. That usually ends up being the port since the phone is exposed to dirt more than the cable, however new cable are usually a tight fit the first few times you use them and will usually clean off the connection inside of the phone. What is the real tell in this is the fact that your phone plugged into the wall says that it is USB connected and not charging. The device recognizes the lower voltage supply and assumes that it is connected to a PC/other device and not an outlet. You may be able to test this by using the device while charging. Under abnormally low voltage supply most devices will popup with a message that "your device cannot charge due to using more current than is provided. please connect to an outlet to charge." This condition can also cause the device to over heat while charging, so you may want to act fast rather than wait. Your corp store w/tech support will usually clean the port at no charge and inspect it for other damage.
On a side note there have been some updates that also cause the device to charge more slowly, however most of the time if it was an update that changed the way something worked you would be seeing other threads about it, and they don't usually cause the device not to recognize its charging source.