• Resolved asseebosmani

    (@asseebosmani)


    Hi there,

    Everytime I update MC4WP from V4.5.5 to the latest I get the following error.

    Fatal error: Uncaught Error: Call to undefined method MC4WP_MailChimp::get_cached_lists() in /home/epc65892/public_html/wp-content/themes/esperto/functions.php:351 Stack trace: #0 /home/epc65892/public_html/wp-content/themes/esperto/includes/resource/options/page_loader.php(55): esperto_get_mc_lists() #1 /home/epc65892/public_html/wp-content/themes/esperto/includes/classes/options.php(348): include(‘/home/epc65892/…’) #2 /home/epc65892/public_html/wp-content/themes/esperto/includes/classes/options.php(52): Esperto\Includes\Classes\Options->sections() #3 /home/epc65892/public_html/wp-content/themes/esperto/includes/classes/base.php(32): Esperto\Includes\Classes\Options->init() #4 /home/epc65892/public_html/wp-content/themes/esperto/includes/loader.php(89): Esperto\Includes\Classes\Base->loadDefaults() #5 /home/epc65892/public_html/wp-includes/class-wp-hook.php(288): esperto_wp_load(”) #6 /home/epc65892/public_html/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array) #7 /home/epc65892/public_html/wp-in in /home/epc65892/public_html/wp-content/themes/esperto/functions.php on line 351

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Lap

    (@lapzor)

    Seems you have some custom code in your themes functions.php

    I recommend to ask your theme developer for support with this or you can remove the code pertaining to Mailchimp for WordPress from your Functions.php

    Thread Starter asseebosmani

    (@asseebosmani)

    This is the line 351

    $lists = $mc4->get_cached_lists();

    /**
    * [esperto_get_mc_lists description]
    */

    function esperto_get_mc_lists( $assos = true ) {

    if ( ! function_exists( ‘mc4wp’ ) ) {

    return array();
    }
    if ( ! class_exists( ‘MC4WP_Mailchimp’ ) ) {

    require_once MC4WP_PLUGIN_DIR . ‘includes/class-mailchimp.php’;

    }
    $mc4 = new MC4WP_Mailchimp();
    $lists = $mc4->get_cached_lists();

    if ( $assos ) {

    $return = array();

    foreach( $lists as $list ) {

    $return[$list->id] = $list->name;

    }

    return $return;

    }
    return $lists;

    }

    /**

    Plugin Contributor Lap

    (@lapzor)

    That function doesn’t exist any longer.
    I recommend using the new function name get_lists() instead of get_cached_lists()

    Note that this sort of custom code is not support by us, and we don’t recommend using this way of using functions within our plugin. Therefore you would really need to contact your theme developer who wrote this code for further support on this.

    Hope that helps

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error’ is closed to new replies.