Title: Programmatic opti-in
Last modified: August 30, 2016

---

# Programmatic opti-in

 *  Resolved [acub](https://wordpress.org/support/users/acub/)
 * (@acub)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/programmatic-opti-in/)
 * Hello. I am working on another plugin that offers the users the possibility to
   opt-in the client’s mailchimp.
 * I’d like to know if this can be done programatically by calling a function in
   your plugin. If so, where should I look?
 * Thank you.
 * [https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/)

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

 *  Plugin Author [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/programmatic-opti-in/#post-6821159)
 * Hi Acub,
 * How are you planning on having users optin? Via checkbox? There is no way to 
   programatically opt-in a user using our plugin. My recommendation would be to
   directly integrate with the MailChimp API. That way you can write a small function
   to subscribe users with.
 * Our plugin expects some form data to be entered, which is the data that actually
   gets sent over to the MailChimp. If you need some pointers setting things up,
   I’d be glad to help out in any way I can.
 * Evan
 *  Plugin Author [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/programmatic-opti-in/#post-6821237)
 * I’m going to close out this issue. If you would like additional help feel free
   to post back here.
 * Thanks,
    Evan
 *  Plugin Contributor [Tracy Levesque](https://wordpress.org/support/users/liljimmi/)
 * (@liljimmi)
 * 🏳️‍🌈 YIKES, Inc. Co-Owner
 * [10 years, 5 months ago](https://wordpress.org/support/topic/programmatic-opti-in/#post-6821238)
 * Hello Acub,
 * We haven’t heard from you in awhile so I am going to close out this ticket.
 * If you need any help implementing what you want to do, feel free to post questions
   here and we will be happy to help.
 * Thank you!
    -Tracy
 *  Thread Starter [acub](https://wordpress.org/support/users/acub/)
 * (@acub)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/programmatic-opti-in/#post-6821256)
 * Hello Tracy, Evan. Thank you for your replies.
 * Yes, in a more complex plugin, at the final step I ask users if they would like
   to sign-up for our newsletter. And with that information, if they said yes, I’d
   like to automatically sign them up, having their acceptance and email address.
   I’m not familiar with MC, I’m assuming that will trigger an email from MC so 
   they can confirm their email address and their option (am I wrong?).
 * So, just to make sure: your plugin does not have an embedded function that can
   call the MC Api for me, I need to build a method for that myself, is that correct?
   I was hoping I could skip authenticating with MC, as I’m assuming your plugin
   already handles that.
 * I’m asking because I’ve never worked with MC before. I’ll read the API if I need
   to, but I won’t if there’s any way around it. 🙂
 * Until we finish this conversation, I’ll mark it as [not a support question], 
   so it doesn’t affect your support ratings.
 * While looking forward to your response I thank you for your time.
 *  Plugin Contributor [Tracy Levesque](https://wordpress.org/support/users/liljimmi/)
 * (@liljimmi)
 * 🏳️‍🌈 YIKES, Inc. Co-Owner
 * [10 years, 5 months ago](https://wordpress.org/support/topic/programmatic-opti-in/#post-6821258)
 * Hi Acub,
 * This is more of an Evan question so he will follow up. But we have this add-on
   functionality for a few popular plugins like Contract Form 7, WooCommerce, etc.
   Where our plugin adds an opt-in checkbox to the end of a form. If the form is
   checked then it’s starts the double opt-in process with MailChimp (an email is
   sent to the user where they can confirm they indeed want to join the list).
 * I am thinking you could add this to your custom function as well with a hook.
   I’ll let Evan answer that part 🙂
 * Thanks!
    -Tracy
 *  Plugin Author [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/programmatic-opti-in/#post-6821270)
 * Hi acub,
 * Unfortunately each of the bundled extensions (CF7, EDD, WooCommerce etc.) have
   a separate class with functions defined specifically for those plugins and have
   had extensive work done on them to be able to integrate with each of the plugins.
 * Feel free to have a look through any of our bundled integrations:
    [https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/tree/5dd3cd24c92b284b1b02ce795e972047c964576d/plugin_core/public/classes/checkbox-integrations](https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/tree/5dd3cd24c92b284b1b02ce795e972047c964576d/plugin_core/public/classes/checkbox-integrations)
 * You should be able to see how we handle each one.
 * If you can explain your plugin in extreme detail as to what you are after, I 
   might be able to point you in the right direction. I’m just not sure what you’re
   trying to do as there are a number of ways you can attack the problem at hand.
 * Thanks,
    Evan
 *  Thread Starter [acub](https://wordpress.org/support/users/acub/)
 * (@acub)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/programmatic-opti-in/#post-6821281)
 * Thank you very much.
    I’ll try to create a reusable class for opt-in, just in
   case it might be useful to anyone in the future.
 * I really appreciate your help.
 * My plugin is quite specific, it’s for an English Language Learning Centre and
   they have this quiz on their website. At the end of the quiz, they ask for the
   email to send results and also they wanted a checkbox for newsletter signup.
 * If it’s checked, besides sending results to both quiz taker and teacher, I need
   to initiate the double opt-in process. That’s about it.

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

The topic ‘Programmatic opti-in’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/yikes-inc-easy-mailchimp-extender_a1c7e5.
   svg)
 * [Easy Forms for Mailchimp](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/)
 * [Active Topics](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [acub](https://wordpress.org/support/users/acub/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/programmatic-opti-in/#post-6821281)
 * Status: resolved