WD-40 is not a lubricant; its a water displacement/penetrating oil; it will wear off very soon. Use either white lithium grease or some type of thin lubricating oil.
And if you had to replace the hood latch cable, its quite easy. I did one on a previously owned 2003 Honda Civic; its just a matter of snaking the cable from the the interior, through the firewall, along the fender, and to the latch assembly.