Title: Plugin is generating PHP warning and error
Last modified: February 26, 2023

---

# Plugin is generating PHP warning and error

 *  Resolved [arthurdaly](https://wordpress.org/support/users/arthurdaly/)
 * (@arthurdaly)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/plugin-is-generating-php-warning-and-error/)
 * 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 –all3. wp
   plugin activate dokan-lite4. wp plugin activate woocommerceThe 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](https://wordpress.org/support/users/jahidulhassan/)
 * (@jahidulhassan)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/plugin-is-generating-php-warning-and-error/#post-16523480)
 * Hi [@arthurdaly](https://wordpress.org/support/users/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](https://github.com/weDevsOfficial/dokan/pull/1828).
 * 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](https://wordpress.org/support/users/jahidulhassan/)
 * (@jahidulhassan)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/plugin-is-generating-php-warning-and-error/#post-16549168)
 * Hi [@arthurdaly](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/dokan-lite/assets/icon-256x256.gif?rev=3239229)
 * [Dokan: AI Powered WooCommerce Multivendor Marketplace Solution – Build Your Own Amazon, eBay, Etsy](https://wordpress.org/plugins/dokan-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dokan-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dokan-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/dokan-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dokan-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dokan-lite/reviews/)

## Tags

 * [cli](https://wordpress.org/support/topic-tag/cli/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * 4 replies
 * 2 participants
 * Last reply from: [Jahidul Hassan Mojumder](https://wordpress.org/support/users/jahidulhassan/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/plugin-is-generating-php-warning-and-error/#post-16549168)
 * Status: resolved