• Resolved arthurdaly

    (@arthurdaly)


    When the dokan-lite plugin is active it throws a PHP warning in wp-cli. The warning persists in wp-cli while the plugin is active. This makes it difficult to use wp-cli for administrative tasks. When dokan-lite is deactivated the warning no longer shows.

    This is the warning message:
    “Warning: call_user_func() expects parameter 1 to be a valid callback, array must have exactly two members in wp-includes/rest-api/class-wp-rest-server.php on line 1487”

    I tested this by deactivating all plugins, and activating default theme twentytwentythree. Then I activated Woocommerce, followed by dokan-lite. If the plugins are activated in the reverse order a fatal error is generated. This may help to identify the source of the problem as it’s not easy to debug given that it’s a rest-api error.

    To generate the warning in php. Type following commands into wp-cli:

    1. wp theme activate twentytwentythree (ensure no theme conflicts)
    2. wp plugin deactivate –all
    3. wp plugin activate woocommerce
    4. wp plugin activate dokan-lite
    5. wp shell or any other wp command


    To generate fatal error. Type following commands into wp-cli:
    1. wp theme activate twentytwentythree (ensure no theme conflicts)
    2. wp plugin deactivate –all
    3. wp plugin activate dokan-lite
    4. wp plugin activate woocommerce

    The following error is generated:
    Fatal error: Uncaught Error: Call to undefined function WeDevs\Dokan\dokan_get_option() in wp-content/plugins/dokan-lite/includes/Rewrites.php:19



Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @arthurdaly,

    Regarding the Warning that you are referring to, we were able to reproduce it and reported it to the assigned team about it. They have already come up with a solution to the issue as you can see from this PR link.

    We were unable to regenerate the second issue. Would you please make sure to use the latest version of the Dokan Lite plugin?

    Cheers!

    Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @arthurdaly,

    Due to inactivity, we are marking this topic as resolved. Feel free to open a new one if you face any further issues.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin is generating PHP warning and error’ is closed to new replies.