How Can I Set Limit To The Compared Product For Magento 2

How can I set limit to the compared product, like max limit 4

You can write plugin to handle the limit for Magento 2 compared product.

app/code/Company/Catalog/etc/frontend/di.xml

app/code/Company/Catalog/Model/Plugin/Compare/LimitToCompareProducts.php

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments