YITH WooCommerce Quick View allows your customers to get a quick view of the products in which they are interested. The product details will be shown in a popup, so they don’t need to leave the page they are currently visiting.
You only have to activate both plugins to make them work together. The combined use of these two plugins will add the “Compare” button in the quick view popup of the product. This will give your customers the possibility to add a product to the compare list without abandoning the current product popup.

For more information about how to set up the YITH WooCommerce Compare plugin, check out the full documentation here.