The only way to guarantee that your pets won't damage the cords (or hurt themselves) is to make it impossible for them to access the cords. You can do this by simply moving them behind a piece of furniture or running them along the top of a wall.
For example, I keep my laptop charger plugged in behind my couch and have positioned the couch so that it's impossible for my dog to get behind. When I need to use the charger I simply extend as much of the cord as I need and then return it to its home when I'm finished. I do the same thing with tv/phone/etc. cords by hiding them behind other pieces of furniture.
For dogs specifically, if they are properly stimulated and have something better to chew on they will ignore the cords. My dog loves Himalayan Dog Chews, Benebones, etc.
Most natural or chemical repellents only work for a short period of time. Chewing [on the cords] is intrinsically rewarding to dogs, so after a while they will be desensitized to whatever you're using to repel them. If you're dead set on using some kind of repellent you can try diluting some hot sauce and spraying that on the cords — it will work better than the bitter apple spray everyone sells. Whatever you do don't use Vicks Vapor Rub as camphor is toxic to dogs.