Skip to content

Commit e068042

Browse files
Update Wishlist.php
updating suggestion
1 parent c41ec76 commit e068042

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

app/code/Magento/Wishlist/Block/Customer/Wishlist.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ public function getWishlistItems()
108108
$this->_prepareCollection($this->_collection);
109109
$this->paginateCollection();
110110
}
111-
112111
return $this->_collection;
113112
}
114113

@@ -119,7 +118,6 @@ public function getWishlistItems()
119118
*/
120119
protected function _prepareLayout()
121120
{
122-
$this->getWishlistItems();
123121
parent::_prepareLayout();
124122
$this->pageConfig->getTitle()->set(__('My Wish List'));
125123
$this->getChildBlock('wishlist_item_pager')
@@ -140,8 +138,7 @@ protected function _prepareLayout()
140138
)->setLimit(
141139
$this->getLimit()
142140
)
143-
->setCollection($this->_collection);
144-
$this->_collection->load();
141+
->setCollection($this->getWishlistItems());
145142
return $this;
146143
}
147144

0 commit comments

Comments
 (0)