Thinking.44121810

Icon missing on vendor dashboard – Dokan Multivendor Marketplace

You all know that recently Fontawesome upgraded their version to v5. They have changed the class name for multiple icons. For that reason, icons are not showing correctly on few plugins or theme with the Fontawesome v4.

Users are frequently getting this icon missing problem with Dokan and few themes. ReHub is one of the best Dokan compatible theme which is using Fontawesome v5. For that reason, few icons are missing from the vendor dashboard like as – Reviews, Reports, Coupons etc.

If you are using the ReHub theme with Dokan or any other theme which is using Fontawesome 5 then you should get the below scenario –

How to fix?

This issue is ocurring because Dokan plugin is using Fontawesome v4 and the theme is using Fontawesome v5. For that reason, few icons are getting the correct class name. Because on the new version most of the classes of Fontawesome start with “fas fa-comments” or “fab fa-gratipay” while it was like fa fa-comments in version 4.

To fix this icon in Dokan you may need a child theme. Because on the core file of Dokan it coded like this –

So, we are unable to modify on the core else, it will be erased on next release of Dokan-lite/pro.

Now, please open your child-theme functions.php and use the below code –

<?php
/*
– Missing icon fixing
– fontawesome v5
– Use the code from line number 7 to 12 on your child-theme functions.php
*/
add_filter ('dokan_get_dashboard_nav','change_icon',16);
function change_icon($urls){
$urls['reviews']['icon'] = '<i class="fas fa-comments"></i>';
$urls['reports']['icon'] = '<i class="fas fa-chart-line"></i>';
return $urls;
}
view raw functions.php hosted with ❤ by GitHub

After that just reload the vendor dashboard page and you will see that icons are back 🙂

Which theme is Dokan compatible?

You can check for more from here.

Share This Post

Related Post

0 thoughts on “Icon missing on vendor dashboard – Dokan Multivendor Marketplace

  1. It helped me a lot. But there is one icon missing – Visit Store. Do you think you can send mi code how to correct it? Thank you

    1. Which theme you are using now? You may need to modify on wp-content/plugins/dokan-lite/includes/template-tags.php and line number 460 and you may need to change the class name 🙂

          1. Its a stupid think. I had to change font awesome from fa fa-external-link to fa fa-external-link-alt. The first one looks like PRO Licence only.

  2. Hey Nayem.

    I want to ask you for help. In this code I had to change fa fa-external-link to fa fa-external-link-alt because of some problems with font awesome. But when is Dokan-lite updated code is change back. I’d like to change it in the functions.php, but my knowledge is not enough. Will you help me? Please.

    $common_links = ‘

  3. can changes to the icons be made via css? ive tried using the above code and it works for some icons but not others. not sure if its something im doing wrong but i figured if it could be done through css i could try that instead. thanks.

    1. I am sorry, it would not be possible to modify via CSS to revert back the font-awesome icons. You have to do it via code as I mentioned. Now, there is no action/filter available then you have to change from the core!

      1. ok update: i realized im only having problems trying to change the icons on tabs that are under the settings tab like the verification, store, seo, etc… is there a change i need to make to the code in order to change icons on that page? ideally i would like to get rid of the settings tab and have all the tabs that are under the settings be on the main dashboard but for now i would at least like to be able to change the icons. i would still like to know the location of the core file as well as where in that file i can make those changes as well please. j

  4. i found the templates-tags.php in the dokan plugin folder but i cant seem to find the proper urls to edit the icons. it looks like its only the ones that are in the dokan lite version but all of the urls to premium modules i cant find to edit. specifically i want to edit the shipstation icon. im also having trouble editing the support one. i thought it was an issue of it being the ones under the settings tab not working but now i have noticed that is not the case since the support one i am having problems with too. what file has the code for the dashboard for pro dokan pro users? thanks in advance. sorry for so many messages but i have been working on my site all day and and finding/learing new things as i go.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: