Title: PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback
Last modified: April 25, 2017

---

# PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback

 *  Resolved [tomkirk23](https://wordpress.org/support/users/tomkirk23/)
 * (@tomkirk23)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-2/)
 * 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](https://wordpress.org/support/users/tomkirk23/)
 * (@tomkirk23)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-2/#post-9074882)
 * Hello?
 *  Plugin Contributor [Darren Peyou](https://wordpress.org/support/users/dpeyou/)
 * (@dpeyou)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-2/#post-9091823)
 * 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 🙂
 *  [wannaprasart](https://wordpress.org/support/users/wannaprasart/)
 * (@wannaprasart)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-2/#post-9526083)
 * .
    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](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-2/#post-9785192)
 * [@wannaprasart](https://wordpress.org/support/users/wannaprasart/) This forum
   is for the plugin WooCommerce Menu Cart, you can find the support forumn for **
   All Meta Tags** here: [https://wordpress.org/support/plugin/all-meta-tags](https://wordpress.org/support/plugin/all-meta-tags)
 *  [palsri](https://wordpress.org/support/users/palsri/)
 * (@palsri)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-2/#post-10002341)
 * 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.

 * ![](https://ps.w.org/woocommerce-menu-bar-cart/assets/icon-256x256.png?rev=2190481)
 * [Menu Cart for WooCommerce](https://wordpress.org/plugins/woocommerce-menu-bar-cart/)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-menu-bar-cart/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-menu-bar-cart/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-menu-bar-cart/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-menu-bar-cart/reviews/)

## Tags

 * [class-wp-hook](https://wordpress.org/support/topic-tag/class-wp-hook/)

 * 5 replies
 * 5 participants
 * Last reply from: [palsri](https://wordpress.org/support/users/palsri/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-2/#post-10002341)
 * Status: resolved