Need some help with WordPress integration

Occasional Participant

Need some help with WordPress integration

I'm using the basic samples for PHP in a WordPress installation. In my theme, I use the simple-form.php, the two text files containing the states/countries, and the cc-class include. In the cc-class include, the only things I've modified are adding my API key + username/password, and specifying the correct list for the Interests as the documentation advises. I've left the basic simple-form script as is (other than removing the header include).

I can get the samples to insert contacts into CC on the list I specify, but I have a few questions:

  • The samples insert contacts "As List Owner" and when I insert a contact, no welcome message or confirm email goes out, even though I have the double opt-in activated in CC and the welcome messages all set up in CC. Are these forms meant for public subscribers to use to sign up? I know I can modify the simple-form to contain only those fields I want, but I can't get it to send a welcome email/confirm when I add contacts.

  • Using ACTION_BY_CONTACT instead of ACTION_BY_CUSTOMER doesn't work -- it seems to still submit the email to CC as if it came from me rather than from the actual subscriber (so no welcome message, and can't enable a subscriber to re-opt-in after they have opted-out)

  • I'm using several test email addresses that I control. When I remove users from my list and try to re-add them through the form, I get a 409 error because they already exist in CC. I know we're supposed to "update" them via the forms rather than re-add them, but if I've removed them from all my lists in CC, shouldn't I be able to re-add them via the forms? The same error occurs even when I add my test emails to the Do Not Mail list.

Please let me know if I'm approaching this all wrong; I just want to customize the sign up form for public subscribers and don't want to use the Join My Mailing List form.

P.S. I've tried the WordPress plugin for this, but it doesn't allow me to control the look of the pages after the user signs up, which is why I've turned to the API.



Nevermind guys - the one thing I missed was to change ACTION_BY_CUSTOMER to ACTION_BY_CONTACT in the cc-class include. (I had tried to change it in an altered version of the script that didn't work). Once I did that, the opt-in and welcome emails went through!

Not applicable


We are glad that you were able to resolve your issue.  Please contact us if you have any additional issues that we can help with.

Developer Portal

View API documentation, code samples, get your API key.

Visit Page