Nevermind the add to cart, I found that I had to also click on an option in woocommerce settings and now it works fine.
But i have another question, how do I display the percentage of a sale on the shop page instead of just the red sale button, so instead of it saying SALE -> -20%, thanks