• Hi, I’d like yo disable the font awesome included by YITH WooCommerce Wishlist, since in my website it’s already included by Elementor. Is there a way to disable it?

    Also, the icon “yith-wcwl-icon fa fa-heart-o” is not showing anymore. Maybe it’s related to the fact that Font Awesome it’s included twice?

    Thanks for your help!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter pizzapie79

    (@pizzapie79)

    Also, I’ve noticed that “yith-wcwl-icon fa fa-heart” (not outline version) is showing, so it seems the issue is related to “yith-wcwl-icon fa fa-heart-o” (outline version).
    Please help, thanks ??

    Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,
    we hope you’re doing well!

    In order to achieve what you need, add the following code in the functions.php file of your active theme:

    if ( ! function_exists( 'yith_wcwl_main_style_deps_custom' ) ) {
        function yith_wcwl_main_style_deps_custom() {
            return array( 'jquery-selectBox', 'woocommerce_prettyPhoto_css' );
        }    
        add_filter( 'yith_wcwl_main_style_deps', 'yith_wcwl_main_style_deps_custom', 99 );
    }

    About the second, could you share the link to your site so we can see what you say?

    We will be attentive to your response.

    Best regards.

    Thread Starter pizzapie79

    (@pizzapie79)

    Hi,
    thank you for your reply.

    1. about the first issue, the code snippet you provided works pretty well, and now “yith-wcwl-font-awesome-css” is not included in my page. So this first issue is solved ??

    2. now, about the second issue, the class “fa fa-heart-o” doesn’t work because Elementor uses “Font Amesome 5 Free)… Is there a way to replace “fa fa-heart-o” with “far fa-heart”?

    Thanks!

    Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,

    We need to be able to visualize your site to see if it is possible to modify it via js code.

    We will be attentive to your response.

    Best regards.

    Thread Starter pizzapie79

    (@pizzapie79)

    Hi, thank you for your reply.
    Unfortunately the issue is not related to a single icon, but it’s related to every icon used by your plugin, since all of them are font awesome icon. For example, icons used on wishlist sharing buttons are not showing.

    In my opinion, to make your plugin more compatible with modern themes and page builders you should provide those options:

    – let the user select if font awesome should be included or not by plugin, since many theme or page builder already have it included and it would be redundant to include twice.
    – let the user select which version of font-awesome use (4 or 5), so it would be more compatible with different themes;

    Or (maybe it’s a quicker fix) just let the user enter a custom class for every icon instead of just select available icon from the dropdown. In that way anyone should be able to set the right class for any icon library.

    What do you think?
    Thanks for your help ??

    Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,

    We will take your comments into account for future updates. Thanks for the mention!

    Anyway, you can use now this filter to change the entire HTML icon:

    yith_wcwl_add_to_wishlist_icon_html

    – wp-content\plugins\yith-woocommerce-wishlist\includes\class-yith-wcwl-shortcode.php —> Line 889

    Can you check it and let me know any news, please?

    Have a nice day!

    Thread Starter pizzapie79

    (@pizzapie79)

    Hi,
    the filter works but now I would need another filter to set a different icon when a product is already added to wishlist… for example, I would like to set outlined heart BEFORE adding to wishlist and filled hearth AFTER adding to wishlist.

    But using this filter I can set only one icon… is that right? Can you provide a differnet filter for products already added to wishlist?

    Really thank you for your help ??

    Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,

    You can use the following code to change the fontawesome class that you need:

    if ( ! function_exists( 'yith_wcwl_button_added_icon_custom' ) ) {
        function yith_wcwl_button_added_icon_custom() {
            return 'fa-heart';
        }
    }
    add_filter( 'yith_wcwl_button_added_icon', 'yith_wcwl_button_added_icon_custom', 99 );

    Check it out and tell us any news, please.

    Best regards.

    Thread Starter pizzapie79

    (@pizzapie79)

    Hi, thank you very much for your reply!

    Ok, using both filter “yith_wcwl_button_icon” and “yith_wcwl_button_added_icon” I managed to set the fontawesome icon class I needed (“far fa-heart” and “fas fa-heart”).

    Thanks again for your help, maybe you should mention about those filters in some documentation.

    Now, I have the same issue with social share icons (facebook, twitter, etc). Are there some filters for those icons too? Thanks!

    Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,
    you’re welcome!

    Our plugin uses the yith_wcwl_get_plugin_icons function to return the list of icons available for each social network, and has a filter to modify what it returns. You can find it in includes\functions-yith-wcwl.php:548:

    return apply_filters( 'yith_wcwl_plugin_icons', $icons, $none_label, $custom_label );

    So you can use a function like this to return a modified listing:

    if ( ! function_exists( 'yith_wcwl_plugin_icons_custom' ) ) {
        function yith_wcwl_plugin_icons_custom( $icons, $none_label, $custom_label ) {
            // the actions you want to perform
            return $icons;
        }
    }
    add_filter( 'yith_wcwl_plugin_icons', 'yith_wcwl_plugin_icons_custom', 99, 3 );

    Check it out and tell us any doubt, please.

    Have a nice day!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Disable Font Awesome + fa-heart-o not showing’ is closed to new replies.