• Resolved tomkirk23

    (@tomkirk23)


    Hi: I am seeing the error message below.

    PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘sa_cp_get_cart_count’ not found or invalid function name in /home/**removed**/public_html/**removed**/wp-includes/class-wp-hook.php on line 298

    I am using the Query Monitor plugin to help determine the cause. Query Monitor provides the Call Stack below and identifes the component as “Plugin: woocommerce-menu-bar-cart.

    If I deactivate Woocommerce Menu Cart, the error message disappears.

    Any thoughts?

    Thanks!

    Call Stack (obtained through Query Monitor plugin):

    apply_filters(‘woocommerce_cart_contents_count’)
    wp-content/plugins/woocommerce/includes/class-wc-cart.php:349

    WC_Cart->get_cart_contents_count()
    wp-content/plugins/woocommerce-menu-bar-cart/includes/wpmenucart-woocommerce.php:32

    WPMenuCart_WooCommerce->menu_item()
    wp-content/plugins/woocommerce-menu-bar-cart/wp-menu-cart.php:429

    WpMenuCart->wpmenucart_menu_item()
    wp-content/plugins/woocommerce-menu-bar-cart/wp-menu-cart.php:353

    WpMenuCart->add_itemcart_to_menu()
    wp-includes/class-wp-hook.php:298

    apply_filters(‘wp_nav_menu_shop_menu_items’)
    wp-includes/nav-menu-template.php:231

    wp_nav_menu()
    wp-content/themes/genesis/lib/functions/menu.php:87

    genesis_get_nav_menu()
    wp-content/themes/genesis/lib/functions/menu.php:145

    genesis_nav_menu()
    wp-content/themes/genesis/lib/structure/menu.php:116

    genesis_do_subnav()
    wp-includes/class-wp-hook.php:298

    do_action(‘genesis_before_header’)
    wp-content/themes/genesis/header.php:33

    load_template(‘~/wp-content/themes/genesis/header.php’)
    wp-includes/template.php:643

    locate_template()
    wp-includes/general-template.php:45

    get_header()
    wp-content/themes/genesis/lib/framework.php:24

    genesis()
    wp-content/plugins/genesis-connect-woocommerce/templates/single-product.php:85

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter tomkirk23

    (@tomkirk23)

    Hello?

    Plugin Contributor Darren Peyou

    (@dpeyou)

    Hi!

    The sa_cp_get_cart_count function that is not found is not part of WP Menu Cart but hooked to a filter *used* by WP Menu Cart (woocommerce_cart_contents_count). That function is possibly either part of your theme or a custom function call in functions.php

    Hope this bit of info helps you ??

    .
    Warning:.
    Warning:class-wp-hook.php on line 298
    .
    plugins
    All Meta Tags
    By Arthur Gareginyan
    .
    Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /home/www/web411/html/bjoern/wp/wp-includes/class-wp-hook.php on line 298
    .
    plugins
    All Meta Tags
    By Arthur Gareginyan
    .
    Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /home/www/web411/html/bjoern/wp/wp-includes/class-wp-hook.php on line 298
    .
    All Meta Tags, class-wp-hook

    Plugin Contributor Ewout

    (@pomegranate)

    @wannaprasart This forum is for the plugin WooCommerce Menu Cart, you can find the support forumn for All Meta Tags here: https://www.ads-software.com/support/plugin/all-meta-tags

    I am not getting the exact solution, but I got a temporary solution for immediate basis, just hide it, I use the function on the top of the file after ‘<?php’ start. It disables the warning.

    define(‘WP_DEBUG_DISPLAY’, false); //It’s work for me

    You may also try

    ini_set(‘display_errors’,’Off’);
    ini_set(‘error_reporting’, E_ALL );
    define(‘WP_DEBUG’, false);

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback’ is closed to new replies.