Add CSS class to add-to-cart button, Woocommerce [closed]

As explained in their documentation WooCommerce provides a templating structure. Copying WC in your theme won’t get you anywhere.

  1. Create a woocommerce folder in your theme.
  2. Copy any template inside the templates folder of WC inside your woocommerce theme folder. Beware you need to keep the structure from templates folder intact in your woocommerce theme folder for this to work.
  3. Modify the templates in your theme’s woocommerce folder to your liking. They have loading precendence over the ones inside plugin’s templates.

Tip: do not copy all the templates from the plugin inside your theme! Only the ones you want to modify. From time to time WC updates their templates and adds functionality. WooCommerce will also let you know when a template you keep in your theme might have an upgraded version inside the plugin, after an upgrade.

And by the way, I suspect the downvote was not for the question itself, but for the title. I bet you know how to add a class to a button. What you didn’t know was how to use the templating system of WooCommerce. Because you didn’t google it, which I think you (technically) know how to do. Please, pardon my touch of sarcasm, it was either that or another downvote.