I have existing product slider and that slider made with object manager so I want to add the product to wishlist by Product id Using Object Manager.
1 Answer
I have found a solution.
<a href="#" data-post='<?php echo $this->helper('Magento\Wishlist\Helper\Data')->getAddParams($product) ?>' class="action towishlist" data-action="add-to-wishlist"><span>Add to wishlist</span></a>