• Resolved IdleWanderer

    (@idlewanderer)


    Hello

    I am making a landing page for my website using Inbound Now’s Landing Page plugin. I want to intergrate it with my mailchimp list and bought inbound now’s plugin to allow that. When I try activating the mailchimp plugin I get this error message:

    Parse error: syntax error, unexpected ‘)’ in /home/idlewa6/public_html/wp-content/plugins/inboundnow-mailchimp/modules/module.subscribe.php on line 59

    I did a ctrl+f search for ‘)’ and could not find any in the plugin’s php-file.

    I am quite new to all of this stuff, so I have no clue how to fix it. How do I even find line 59?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter IdleWanderer

    (@idlewanderer)

    I think I found the area of interest in the php-file, but I have no clue how to fix. If I remove one thing, another thing is wrong

    <blockquote>/**
     *   Create merge vars
     */
    function inbound_mailchimp_create_merge_vars( $MailChimp , $data , $target_list ) {
    
    	/* Check if merge vals have already been generated by this list in the last hour */
    	 $added =  get_transient( 'inbound_mailchimp_update_merge_vals_' . $target_list ) ) {
    	//$added = 0;
    
    	unset( $data['wpleads_email_address'] );
    
    	foreach ($data as $key => $value ) {
    
    		/* ignore hidden inbound related form fields */
    		if ( strstr( $key , 'inbound_' ) ) {
    			continue;
    		}
    
    		/* Generate merge fields */
    		$field = inbound_mailchimp_get_field_type( $key );
    		$merge_vars[ $field['tag'] ] = $value;
    
    		/* Skip api call to add merge fields if recently added or if native merge field  */
    		if ($added || $field['tag'] =='FNAME' || $field['tag'] == 'LNAME') {
    			continue;
    		}
    
    		$args = array(
    			'id' => $target_list,
    			'tag' => $field['tag'],
    			'name' => $field['name'],
    			'options' => array(
    				'field_type' => $field['field_type'],
    				'public' => false
    				)
    		);
    
    		$result = $MailChimp->call('/lists/merge-var-add', $args );
    
    	}
    
    	set_transient( 'inbound_mailchimp_update_merge_vals_' . $target_list , true , 60 * 60 );
    
    	return $merge_vars;
    }
    
    </blockquote>

    Thread Starter IdleWanderer

    (@idlewanderer)

    This one here is line 59 I think:

    $added = get_transient( ‘inbound_mailchimp_update_merge_vals_’ . $target_list ) ) {

    I tried removing one ), but did not help, as then the { caused the error…

    Thread Starter IdleWanderer

    (@idlewanderer)

    Solved! Was a faulty file. The guys at Inbound Now has fixed the problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error when trying to activate plugin’ is closed to new replies.