IPhone 7 plus dongle (adapter to charge and listen to music simultaneously) not working properly?

I purchased this just a week or so ago and it worked perfectly. But all of a sudden it doesn't want to charge my phone. I have my headphones connected as well and they are working fine. But it won't charge for some reason. The problem isn't the charger because without the dongle, it charges. Is there any fix?