• Resolved timm088

    (@timm088)


    (I’ve posted this issue on the github project also, and with ninjaforms, however, wondering if any savvy developers/users here might be able to help rectify this issues.)

    We are running ninja forms 2.9.27 with Ninja Forms – Mailchimp 1.3.4
    We get the following fatal error when enabling wp_debug (in Form Actions)

    Notice: Undefined property: MailChimp::$lists in /wp-content/plugins/ninja-forms-mailchimp/ninja-forms-mailchimp.php on line 345

    Fatal error: Call to a member function mergeVars() on a non-object in /wp-content/plugins/ninja-forms-mailchimp/ninja-forms-mailchimp.php on line 345

    Interestingly, we only encounter this issue with our version of PHP5 (PHP 5.5.9-1)

    Does not manifest in PHP5.3 (reverting to this older version of PHP is not an option at the moment)

    https://wordpress.org/plugins/ninja-forms/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter timm088

    (@timm088)

    The function in question looks like this

    function ninja_forms_mc_get_merge_vars( $list_id = '' ) {
    
    	if ( ! class_exists( 'Mailchimp' ) ) {
    		require_once 'Mailchimp.php';
    	}
    
    	$options = get_option( 'ninja_forms_settings' );
    
    	$verify_ssl = isset( $options['ninja_forms_mc_disable_ssl_verify'] ) ? false : true;
    
    	$opts = array(
    		'debug' => defined( 'WP_DEBUG' ) && WP_DEBUG,
    		'ssl_verifypeer' => $verify_ssl,
    	);
    
    	$api  = new Mailchimp( trim( $options['ninja_forms_mc_api'] ), $opts );
    	<line 345> $vars = $api->lists->mergeVars( array( $list_id ) );
    
    	if( ! empty( $vars['data'][0] ) ) {
    
    		return $vars['data'][0]['merge_vars'];
    
    	}
    
    	return false;
    }
    Thread Starter timm088

    (@timm088)

    Thanks to Pippin (plugin developer) I have fixed this issue.

    There was a conflict with the Divi Theme and its use of the Mailchimp API (Divi is a theme, not a plugin, so I was looking in the wrong place for a conflict).

    Really responsive communications from the plugin developer.

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

The topic ‘Mailchimp Addon’ is closed to new replies.