Viewing 2 replies - 1 through 2 (of 2 total)
  • 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

    (@dvankooten)

    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', '[email protected]', 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.