Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Victor Falcon

    (@victoor89)

    Thanks! New update available fixing that issue… ??

    Thread Starter Claudio Sanches

    (@claudiosanches)

    In __construct() you defined:

    $this->mailchimp_api_key = $this->get_option( 'mailchimp_api_key' );
    $this->mailchimp_list_id = $this->get_option( 'mailchimp_list_id' );
    

    So, just use:

    $mc = new MailChimp( $this->mailchimp_api_key );
    
    $result = $mc->call('lists/subscribe', array(
        'id'         => $this->mailchimp_list_id,
        'email'      => array( 'email' => $object->billing_email ),
        'merge_vars' => array(
                            'FNAME' => $object->billing_first_name,
                            'LNAME' => $object->billing_last_name
                        ),
        'double_optin'      => false,
        'update_existing'   => false,
        'replace_interests' => false,
        'send_welcome'      => false,
    ));
    

    No need to load the options twice ??

    Plugin Author Victor Falcon

    (@victoor89)

    Thanks! Changed! ??

    Thread Starter Claudio Sanches

    (@claudiosanches)

    ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘You need to remove your API Key and List ID from the code!’ is closed to new replies.