Home Forums Theme Support Dokan Interference with other plugins or themes notes on two things

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Nayem 4 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #39830

    Brenda
    Participant
    Post count: 170

    Right now, there are two main interference type problems we have with the latest Dokan. The first is a bug in the code which can prevent other plugins from getting info from the developer's web site. For instance, when we have a plugin update, we provide ‘info' on the new update including a changelog and description of the update. The Dokan bug prevents this info from our plugin from being displayed to the user–the Dokan bug essentially destroys update info from other plugins. The fix is simple.

    Edit the file ‘dokan/classes/update.php'

    At the end of the function named ‘check_info' around line 199 the code says:
    return false;
    It should say:
    return $false;

    Adding the dollar sign changes the return value to the first function argument
    (called $false) which contains other plugin info rather than the boolean false which destroys that info.

    This is a problem with all Dokan plugin versions we have seen, reported, and has not been fixed by WeDevs, but really needs to be fixed by them. Until then, make the above fix in your copy.

    The next problem is a theme interaction issue we have while using Kadence Virtue Premium Theme and may not be a problem for other themes. The problem manifests in the product edit of the seller's dashboard. Specifically, the tabs do not work and all edit items are in one long list. To fix this problem we edit the file ‘dokan/includes/theme-functions.php'

    In the function ‘dokan_edit_product_url' around line 704 in Dokan 2.0 there is a line of code that says:
    return trailingslashit( get_permalink( $product_id ) ). ‘edit/';

    That line causes the problem and can be commented out by adding two slashes to the beginning of the line as follows:
    //return trailingslashit( get_permalink( $product_id ) ). ‘edit/';

    This fixes the problem and then the tabs sort and organize the product data as intended. Similarly, this is a problem in all Dokan plugin versions we have seen. We do not know why this line of code remains in Dokan, but if you have a similar problem, try commenting out that line and see if it fixes the problem for you.

    #39892

    Nayem
    Moderator
    Post count: 6480

    Hello Brenda,

    Thank you very much for your solution. I believe your solution will help our customers.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Interference with other plugins or themes notes on two things’ is closed to new replies.