• Resolved keramikoch

    (@keramikoch)


    I am experiencing a fatal error related to the get_manage_stock function within Dokan Lite’s code. This issue occurs during the WooCommerce checkout process and appears to be specific to Dokan’s handling of order items.

    Error Details: Here’s the error message from my logs:

    vbnet

    Code kopieren

    PHP Fatal error: Uncaught Error: Call to a member function get_manage_stock() on bool in /wp-content/plugins/dokan-lite/includes/Order/Hooks.php on line 542 Stack trace: #0 /wp-includes/class-wp-hook.php(324): WeDevs\Dokan\Order\Hooks->handle_order_notes_for_suborder() #1 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #2 /wp-includes/plugin.php(517): WP_Hook->do_action() #3 /wp-content/plugins/woocommerce/includes/wc-stock-functions.php:170...

    Description of the Issue: This error seems to occur when Dokan Lite attempts to retrieve stock information (get_manage_stock) on an order item, even if $product is not valid. In my setup, I have a multisite environment using WooCommerce Global Cart to manage multisite checkout, but the issue is specifically within Dokan Lite’s handling of order stock, as shown in the error trace above.

    Attempts to Fix: I’ve considered modifying Dokan Lite’s code to add a conditional check around $product to ensure it’s a valid object before get_manage_stock() is called. However, I’d prefer to avoid modifying the core plugin code and hope you can advise a way to handle this error more gracefully.

    Could you please assist in providing a safe, sustainable solution or suggest any hooks or filters that would prevent Dokan from calling get_manage_stock() on a non-existent or invalid product object? Your guidance on handling this within Dokan Lite’s structure would be greatly appreciated.

    Thank you for your help, and please let me know if you need further information to address this issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Tanvir Hasan

    (@tanvirh)

    Hi @keramikoch

    Thank you for sharing the error you’re experiencing. Unfortunately, Dokan does not support a WordPress multisite network setup. However, you can still use Dokan on individual sites within your multisite network. To do this, keep the Dokan plugin deactivated in network mode and activate it only on the specific site where you want to use it.

    Thanks!

    Thread Starter keramikoch

    (@keramikoch)

    Hi Tavir, thanks for the answer. I should have mentiond it. Of course I have Dokan Marketplace only activated on the subsite, not on the network view – the text I had sumed up with ai , so the explanation is not perfect. Anyhow – The error is not due to a Multisite Activation but on a single site.. The fatal error seems to be an error in the code as far as my coding experience lets me understand that.

    Please also see my proposed solution to solve this error.

    • This reply was modified 3 weeks, 1 day ago by keramikoch.
    Plugin Support Tanvir Hasan

    (@tanvirh)

    Hi @keramikoch

    Thank you for the clarification.

    It looks like there might be a conflict between the Dokan and the site theme or another plugin. To troubleshoot this, please try the steps below.

    • Please deactivate all plugins except the Dokan, Dokan Vendor Dashboard, and WooCommerce.

    If the above method doesn’t resolve your problem, go for the next.

    • Switched to any default theme like Twenty Twenty or Storefront.
    • Clear your site cache as well as the browser cache and try the process again.

    You can follow this third-party article to trace the conflict.

    If the problem gets resolved, it can be said that there’s a conflicting theme or plugin on your site.

    I hope the information will help.

    Thanks!

    Plugin Support Tanvir Hasan

    (@tanvirh)

    Hi @keramikoch

    As we haven’t heard back from you for a while, we’ll consider this topic resolved. If you encounter any further issues, please don’t hesitate to open a new topic.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.