I am trying to get the wishlist products collection of a particular customer by the customer Id. but it is not working. I am using the following code :
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$wishlist = $objectManager->get('\Magento\Wishlist\Model\Wishlist');
$wishlist_collection = $wishlist->loadByCustomerId($userId, true)->getItemCollection();