Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thagxt/9955388 to your computer and use it in GitHub Desktop.
Save thagxt/9955388 to your computer and use it in GitHub Desktop.
Add to cart button for Variables on Shop page in WooCommerce
WTF: Get the add to cart button on Shop/Category/Search pages in WooCommerce. Not ajax version, works with Variable Products.
HOW:
1) create a directory, name it "woocommerce" put it in your theme root.
2) copy/pasta from woocommerce plugin directory the content-product.php file
3) at the end of the (content-product.php) file, paste the code below:
<?php do_action( 'woocommerce_single_product_summary' ); ?>
<?php do_action( 'woocommerce_after_shop_loop_item' ); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment