Function That Adds An ‘Add To Cart’ Button On Divi Catalog Pages

In order to add an ‘Add To Cart’ button on any/all Divi Catalog Pages, we found an amazing page with a pretty awesome Function.

Here’s the page:

And here’s the code:

// register add to cart action
function dac_add_cart_button () {
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_add_to_cart', 10 );
add_action( 'after_setup_theme', 'dac_add_cart_button' );
Google Rating
Based on 54 reviews
Get a Quote