Example #1
0
 /**
  * Retrieve Wishlist model
  *
  * @return \Magento\Wishlist\Model\Wishlist
  */
 protected function _getWishlist()
 {
     if (is_null($this->_wishlist)) {
         $this->_wishlist = parent::_getWishlist();
         if ($this->_wishlist->getCustomerId() != $this->_getHelper()->getCustomer()->getId()) {
             $this->_wishlist->unsetData();
         }
     }
     return $this->_wishlist;
 }
Example #2
0
 /**
  * Retrieve Wishlist model
  *
  * @return \Magento\Wishlist\Model\Wishlist
  */
 protected function _getWishlist()
 {
     if (is_null($this->_wishlist)) {
         $this->_wishlist = parent::_getWishlist();
         $currentCustomerId = $this->_getHelper()->getCustomer()->getId();
         if (!$this->_wishlist->getVisibility() && $this->_wishlist->getCustomerId() != $currentCustomerId) {
             $this->_wishlist->unsetData();
         }
     }
     return $this->_wishlist;
 }