Magento

Magento 2: Walk through collection and delete

Pinterest LinkedIn Tumblr

for mega delete we can use walk method instead of foreach loop.

$collection = $this->filter->getCollection($this->collectionFactory->create()); $collectionSize = $collection->getSize();
$collection->walk(‘delete’);

Write A Comment

Faster PHP Cloud Hosting