Title: Programmatically set user email address?
Last modified: December 28, 2019

---

# Programmatically set user email address?

 *  Resolved [sarmatopia](https://wordpress.org/support/users/sarmatopia/)
 * (@sarmatopia)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/programmatically-set-user-email-address/)
 * We’re using The Newsletter Plugin which, when an email recipient clicks a link
   in an email, sets the user id in a cookie. I’m able to read this cookie and garner
   the user’s email address as soon as the user loads the website. Is there a PHP
   function in WooCommerce Cart Abandonment Recovery I can use to set the current
   user’s email address?
 * This would be huge. All our traffic comes from email, so all our abandoned carts
   could be followed up.
 * [https://wordpress.org/plugins/newsletter/](https://wordpress.org/plugins/newsletter/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [CartFlows Team](https://wordpress.org/support/users/cartflows/)
 * (@cartflows)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/programmatically-set-user-email-address/#post-12278471)
 * Hello [@sarmatopia](https://wordpress.org/support/users/sarmatopia/),
 * Thank you for reaching out to us.
 * Plugin captures the checkout data with an email address when users enter the 
   email address on the checkout page. Then for recovery, it creates the token in
   which you can find out user email. But there is no such function for the email.
 * If you have any questions, please fill free to open a support ticket [here](https://cartflows.com/support/).
 * Thank You!
 *  [Wayne Thorley](https://wordpress.org/support/users/waynusanus/)
 * (@waynusanus)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/programmatically-set-user-email-address/#post-12720809)
 * I agree this would be a great feature. Being able to programmatically set the
   email address would really open up the effectiveness of the cart abandonment 
   sequence. I have a good deal of customers that add products to their basket but
   never actually visit the checkout page. For some, I have already captured their
   email address via other marketing functions as they’ve browsed the site. If there
   was a way to set the email address programmatically those potential customers
   could be receiving the abandonment sequence.
 *  Plugin Support [CartFlows Team](https://wordpress.org/support/users/cartflows/)
 * (@cartflows)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/programmatically-set-user-email-address/#post-12723424)
 * Hello [@waynusanus](https://wordpress.org/support/users/waynusanus/),
 * We have a plan to ask for an email when any user click on the add to cart button.
 * This is a good way to collect emails even though users visit the checkout page
   or not.
 * Thank you for your suggestions.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Programmatically set user email address?’ is closed to new replies.

 * ![](https://ps.w.org/woo-cart-abandonment-recovery/assets/icon-256x256.gif?rev
   =3370405)
 * [Cart Abandonment Recovery for WooCommerce – Recover Lost Sales with Automated Emails](https://wordpress.org/plugins/woo-cart-abandonment-recovery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-cart-abandonment-recovery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-cart-abandonment-recovery/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-cart-abandonment-recovery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-cart-abandonment-recovery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-cart-abandonment-recovery/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [CartFlows Team](https://wordpress.org/support/users/cartflows/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/programmatically-set-user-email-address/#post-12723424)
 * Status: resolved