I am trying to override ListProduct.php Block File Using Preference method But InitialiseProductCollection() being a protected function does not give me result. I need to know how can I override a protected function of ListProduct.php

1 Answer 1


You can check the solution of your problem here:Magento 2 Override ListProduct.php Block File.

Let's us know if solution help you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.