• Resolved taktlosde

    (@taktlosde)


    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 to see the link]

Viewing 1 replies (of 1 total)
  • Hi @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


Viewing 1 replies (of 1 total)

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