Block/Recommended/Wishlistproducts.php
public function _getWishlist()
    {
        $customerId = (int) $this->getRequest()->getParam('customer_id');
        if (!$customerId) {
            return [];
        }

        $customer = $this->customerFactory->create();
        $this->customerResource->load($customer, $customerId);
        if (! $customer->getId()) {
            return [];
        }

        return $this->wishlist->getWishlistsForCustomer($customerId);
    }
public function _getWishlist()
    {
        $customerId = (int) $this->getRequest()->getParam('customer_id');
        if (!$customerId) {
            return [];
        }

        $customer = $this->customerFactory->create();
        $this->customerResource->load($customer, $customerId);
        if (! $customer->getId()) {
            return [];
        }

        return $this->wishlist->getWishlistsForCustomer($customerId);
    }
public function _getWishlist ( ) { $ customerId = ( int ) $ this -> getRequest ( ) -> getParam ( 'customer_id' ) ; if ( ! $ customerId ) { return [ ] ; } $ customer = $ this -> customerFactory -> create ( ) ; $ this -> customerResource -> load ( $ customer , $ customerId ) ; if ( ! $ customer -> getId ( ) ) { return [ ] ; } return $ this -> wishlist -> getWishlistsForCustomer ( $ customerId ) ; }
Get wishlist for customer.

@return array|bool
Get wishlist for customer .