Skip to content

Auto Subscribe WC or WP Registered user to Sendy list. Updated.

edited December 2020 in Contributions

Updated contribution.

I found Pross' work here

It won't work with current Sendy because there is not API key in pross' code since it was for a older Sendy version.

I have added the needed code to:
Have api key, firstname, and a customer role filter list.
If new account doesn't have the first_name filled in pull it from the registration POST.
WP "user_register " does not write out to the database until after registration is complete.
This code is for WC Customers, but could easily switch to WP Subscribers. We are assuming they bought products or created an account in WC.
We dont bypass double opt in or set gdpr. That could be added as needed.

The updated Gist is here:

the regular guy

This discussion has been closed.