Yes, according to the European Commission's definition of legal grounds for processing data, you comply as long as you have the visitor's explicit consent to receive those emails.
Following the GDPR, abandoned shopping cart emails may be sent. According to the GDPR, you comply with the rules as long as you have explicit permission from the visitor to receive these e-mails. You'll have this because they have explicitly agreed to an opt-in. This may have happened, for example, when they created an account or registered for the newsletter.
In our App package you can indicate whether you want to send visitors with or without opt-in an abandoned shopping cart email.
In addition, we have the option for recipients to unsubscribe. We will then no longer send emails.