When you visit ecommerce website looking for something, often during your search you find some items you really like but you didn’t think about purchasing before your search. And this is why you add them into your wish-list, to remember them and to succeed in purchasing them later.
So, Let’s see how to add wishlist button to appear under each product. So first of all download, install and active WooCommerce plugin : YITH WooCommerce Wishlist developed by YITHEMES
Copy below code and add this code in your theme’s functions.php file of your active child theme (or theme).
add_action( 'woocommerce_after_shop_loop_item', 'Display_wishlist_loop', 97 ); function Display_wishlist_loop() { echo do_shortcode( "[yith_wcwl_add_to_wishlist]" ); }
You must be logged in to post a comment.