Divi theme has 3 modules that display WooCommerce products on different pages. The shop module displays the products on any page.
The Upsells module displays the upsell products on single product pages.
And the Related products module displays the related products on single product pages.
All the 3 modules do not display the “add to cart” button. This button is important to make it easy for your customers to add more products to the cart. This should lead to more sales.
Luckily, adding the add to cart button is really simple.
Add the following code to your child theme’s functions.php file at the very end (but before ?> if the file ends with it).
add_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 9);
That’s it for today’s snippet. Let me know you want to see more like snippets this.
0 Comments