We want to intercept all cart abandonment and receive an email with the cart content and the customer details of all the customer who have reached the checkout page and not completed a purchase.
We know that exist a plugin for that, but we want a light weight snippet of code that simply send an email when customer details are known and he has navigated away from checkout page without completing a purchase.
We don't expect so many clients reaching checkout so we don't care about receiving some junk email if a client reloads the page, but if you can address this also will be good. (Resend the email on reload only if customer details or cart content changes). If this is complicated, please leave it.
Code must be appliable to two WooCommerce websites
I previously have posted this request as part of a job called "Personalize the template of WooCommerce checkout page", but I have solved myself the first part of that request, so I cancelled that job and I post again this new request...