Add wishlist button in shop page, categories pages in woocommerce using YITH WooCommerce Wishlist Plugin

Add wishlist button in shop page, categories pages in woocommerce using YITH WooCommerce Wishlist Plugin

Here is a quick snippet to add wishlist button on shop page, categories pages in woocommerce using YITH WooCommerce Wishlist Plugin. You can place that snippet in functions.php in your theme’s folder.
You can read more YITH WooCommerce Wishlist Documentation here

function yith_wcwl_add_wishlist_to_loop(){
	echo do_shortcode( '[yith_wcwl_add_to_wishlist label="" product_added_text="Product added to wishlist" browse_wishlist_text="View wishlist" already_in_wishslist_text=""  icon="fa fa-heart"]' );
}
add_action( 'woocommerce_after_shop_loop_item', 'yith_wcwl_add_wishlist_to_loop', 10 );

Here is the final result:

Comments

comments

Share