• Crons and all other WP CLI commands are broken with Give plugin. Disabling Give gets rid of this.

    Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, array must have exactly two members in /home/runcloud/webapps/xxxxxxx/wp-includes/rest-api/class-wp-rest-server.php:1529
    Stack trace:
    #0 /home/runcloud/webapps/xxxxxxx/wp-includes/rest-api/class-wp-rest-server.php(1470): WP_REST_Server->get_data_for_route()
    #1 /home/runcloud/webapps/xxxxxxx/wp-includes/rest-api/class-wp-rest-server.php(1277): WP_REST_Server->get_data_for_routes()
    #2 /home/runcloud/webapps/xxxxxxx/wp-includes/rest-api/class-wp-rest-server.php(1193): WP_REST_Server->get_index()
    #3 /home/runcloud/webapps/xxxxxxx/wp-includes/rest-api/class-wp-rest-server.php(1041): WP_REST_Server->respond_to_request()
    #4 /home/runcloud/webapps/xxxxxxx/wp-content/plugins/woocommerce/includes/cli/class-wc-cli-runner.php(63): WP_REST_Server->dispatch()
    #5 phar:///RunCloud/Packages/RunCloudAgent/bin/wp-cli/vendor/wp-cli/wp-cli/php/class-wp-cli.php(336): WC_CLI_Runner::after_wp_load()
    #6 phar:///RunCloud/Packages/RunCloudAgent/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1389): WP_CLI::do_hook()
    #7 phar:///RunCloud/Packages/RunCloudAgent/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1282): WP_CLI\Runner->load_wordpress()
    #8 phar:///RunCloud/Packages/RunCloudAgent/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
    #9 phar:///RunCloud/Packages/RunCloudAgent/bin/wp-cli/vendor/wp-cli/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\LaunchRunner->process()
    #10 phar:///RunCloud/Packages/RunCloudAgent/bin/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
    #11 phar:///RunCloud/Packages/RunCloudAgent/bin/wp-cli/php/boot-phar.php(20): include('...')
    #12 /RunCloud/Packages/RunCloudAgent/bin/wp-cli(4): include('...')
    #13 {main}
      thrown in /home/runcloud/webapps/xxxxxxx/wp-includes/rest-api/class-wp-rest-server.php on line 1529
    Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.
    • This topic was modified 10 months, 3 weeks ago by Clint Johnson.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Clint Johnson

    (@nmbgeek)

    Note that this conflict seems to only occur with WooCommerce and appears to be similar to the issue Google Site Kit had here – https://github.com/google/site-kit-wp/issues/1208

    midihead

    (@midihead)

    @nmbgeek,

    Are you also running the Give PDF Receipts plugin? I have been getting the exact same error with it and WooCommerce for quite some time. My server crons also won’t run as they rely on wp-cli. If I deactivate Give PDF Receipts, then Give and Woocommerce don’t conflict for me and my crons work fine.

    I reported this to Give Support back in November of 2023. If your issue is also related to using Give PDF Receipts, please consider going here (https://feedback.givewp.com/bug-reports/p/pdf-receipts-add-on-breaks-wp-cli-on-certain-servers) and upvote this issue so that hopefully they will fix it more quickly.

    Plugin Support Matheus Martins

    (@matheusfd)

    Hi all!

    What @midihead said is 100% correct. In specific scenarios where you have GiveWP + WooCommerce, the WP CLI might break.

    We are tracking this issue here: https://feedback.givewp.com/bug-reports/p/pdf-receipts-add-on-breaks-wp-cli-on-certain-servers.

    As soon as a fix for it is released, we will update the feedback site to reflect it.

    While we work on a fix, feel free to message us if you have further questions or need any additional assistance!

    I recall reporting this same error to GiveWP sometime back in 2023…it may have made it into a Bug Report over at https://feedback.givewp.com/, but I can’t recall at the moment. Anyway, until they get this fixed, you can add the following to your wp-cli.yml:

    skip-plugins:
    - give-pdf-receipts

    Also, this bug appears to be found in /give-pdf-receipts/src/PdfExport/API/ListExports.php::getSchema(). The schema returned there doesn’t match other valid schema I see output when I run an error_log() inside ?/wp-includes/rest-api/class-wp-rest-server.php on line 1566:

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WP CLI broken with Give’ is closed to new replies.