Title: Hard code subscribe
Last modified: August 21, 2016

---

# Hard code subscribe

 *  Resolved [daniel.mouraa](https://wordpress.org/support/users/danielmouraa/)
 * (@danielmouraa)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/hard-code-subscribe/)
 * Do exists some function to pass the email and name as a parameter to subscribe
   the user? I have a especific situation that i need to subscribe the user whitout
   the form.
 * Thanks already, great plugin!
 * [https://wordpress.org/plugins/mailchimp-for-wp/](https://wordpress.org/plugins/mailchimp-for-wp/)

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

 *  [lancermedia](https://wordpress.org/support/users/lancermedia/)
 * (@lancermedia)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/hard-code-subscribe/#post-5121304)
 * Curious about this as well. For the time being I’m including the checkbox, just
   hiding it via CSS.
 * -Kevin
 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/hard-code-subscribe/#post-5121375)
 * Hi Daniel,
 * I hope I understand your question correctly but you can use something like the
   following PHP function to subscribe a given email address to a MailChimp list.
 *     ```
       $api = mc4wp_get_api();
       $api->subscribe( 'abc123def', 'john@doe.com', array( 'NAME' => 'John Doe' ) );
       ```
   
 * `abc123def` is the List ID to subscribe to here.
 * If you want to subscribe a user without showing them an option, just include 
   a hidden field in any form. Like this.
 *     ```
       <input type="hidden" name="mc4wp-subscribe" value="1" />
       ```
   
 * Or, simply have the plugin add the checkbox and then hide it via CSS. Like Kevin
   did. 🙂
 * Hope tha thelps!

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

The topic ‘Hard code subscribe’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp-for-wp/assets/icon-256x256.png?rev=1224577)
 * [MC4WP: Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp-for-wp/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/hard-code-subscribe/#post-5121375)
 * Status: resolved