By default the cart recovery plugin tracks all carts, and sends out campaigns to all carts that enter the recovery process. Sometimes though you might not want to send campaigns to some users. For example if you have some users who are wholesale customers that you don’t want campaigns to go to.
Here’s an example that will block sending of campaigns to any carts that belong to logged in users.
Within your filter, you can access the customer’s email, their cart details, and the campaign being sent. So, for example you could block the campaign being sent to people whose email matched a specific domain.