Title: Error /woocommerce/includes/cli/class-wc-cli-runner.php(63):
Last modified: September 19, 2023

---

# Error /woocommerce/includes/cli/class-wc-cli-runner.php(63):

 *  Resolved [taktlosde](https://wordpress.org/support/users/taktlosde/)
 * (@taktlosde)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/error-woocommerce-includes-cli-class-wc-cli-runner-php63/)
 * Hello,
   Woocommerce seems to break parts of the WP_Rest_Server Class. Could you
   please take a look whats causing this?`Failed to reset cache for the instance#
   18: PHP Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback)
   must be a valid callback, array must have exactly two members in /var/www/vhosts/``------`/
   httpdocs/wp-includes/rest-api/class-wp-rest-server.php:1504 Stack trace: #0 /
   var/www/vhosts/------/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(
   1445): WP_REST_Server->get_data_for_route() #1 /var/www/vhosts/------/httpdocs/
   wp-includes/rest-api/class-wp-rest-server.php(1272): WP_REST_Server->get_data_for_routes()#
   2 /var/www/vhosts/------/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(
   1188): WP_REST_Server->get_index() #3 /var/www/vhosts/------/httpdocs/wp-includes/
   rest-api/class-wp-rest-server.php(1035): WP_REST_Server->respond_to_request()#
   4 /var/www/vhosts/------/httpdocs/wp-content/plugins/woocommerce/includes/cli/
   class-wc-cli-runner.php(63): WP_REST_Server->dispatch()
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-woocommerce-includes-cli-class-wc-cli-runner-php63%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [WPRobo Limited](https://wordpress.org/support/users/wprobo/)
 * (@wprobo)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/error-woocommerce-includes-cli-class-wc-cli-runner-php63/#post-17063566)
 * Hi [@taktlosde](https://wordpress.org/support/users/taktlosde/)
 * Based on the information you’ve provided, it appears there’s an issue related
   to the `WP_REST_Server` class within WooCommerce and its interaction with the
   WP Rest API.
    - Ensure that both WordPress and WooCommerce are updated to their latest versions
    - The error suggests an issue with call_user_func(), which expects a valid callback.
      Ensure that any custom code or modifications you’ve added are correctly using
      this function. Specifically, if you’re passing an array as a callback, it 
      should have exactly two members: an object (or class name) and a method name.
    - Deactivate all plugins except WooCommerce and then check if the error persists.
    - If you have custom REST API endpoints or have modified existing ones, review
      the code for any inconsistencies, especially around callback functions.
    - The error seems to originate from class-wc-cli-runner.php within WooCommerce.
      This file is related to WooCommerce CLI commands. If you’ve written or are
      using any custom CLI commands related to WooCommerce, they might be the culprit.
 * I hope this provides a clear direction for troubleshooting. Let me know if you
   require further assistance or have additional questions.
 * Raza
 * [WPRobo](https://wprobo.com/?utm=wp-support)

Viewing 1 replies (of 1 total)

The topic ‘Error /woocommerce/includes/cli/class-wc-cli-runner.php(63):’ is closed
to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [WPRobo Limited](https://wordpress.org/support/users/wprobo/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/error-woocommerce-includes-cli-class-wc-cli-runner-php63/#post-17063566)
 * Status: resolved