I need to write a plugin for denying visitor to add to wish list and add to compare. But i cannot find which model and function i should refer to. I have implemented it successfully to disabling add to cart.
Following is my implementation sample for intercepting add product to cart.
Note: I do not wish to remove the block from user interface.
What type name and function should i refer to for:
1) Add to wish list
2) Add to compare
3) Send Email
For add to cart
<type name="Magento\Checkout\Model\Cart">
<plugin name="interceptAddingProductToCart"
type="Vendor\Module\Plugin\Cart"
sortOrder="10"
disabled="false"/>
</type>
Plugin Function
public function beforeAddProduct($subject, $productInfo, $requestInfo = null)
{
// logic here
}