How to switch from FontAwesome to some other solution?

Top WooCommerce & WordPress Plugins Forums Wish List for WooCommerce How to switch from FontAwesome to some other solution?

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

    I’m looking to purchase this, but I would like to avoid using font awesome icons, I custom developed my theme and I’ve been trying to move away from all font icons and more towards SVGs for speed and other purposes and reduce load that the font awesome library brings. Is there any way to change the icons out to something on my own via CSS? When I disable font awesome, nothing loads up at all.

    Pablo Pacheco

    Hi John,

    Sorry for the delay. Yes, there are 2 ways.

    1 – You can choose what will be the css classes for the new icons by adding this to your functions.php:

    add_action( 'alg_wc_wl_locate_template_params', function ( $params, $final_file, $path ) {
       $params['btn_icon_class']       = 'new-icon-class';
       $params['btn_icon_class_added'] = 'new-icon-class-when-item-is-added';
       return $params;
    }, 10, 3 );
    add_filter( 'alg_wc_wl_fa_icon_class', function ( $class, $icon ) {
       switch ( $icon ) {
          case 'facebook':
             $class = 'fab fa-facebook-square';
          case 'twitter':
             $class = 'fab fa-twitter-square';
          case 'google_plus':
             $class = 'fab fa-google-plus-square';
          case 'email':
             $class = 'fas fa-envelope-square';
          case 'copy':
             $class = 'fas fa-copy';
          case 'remove_btn':
             $class = 'fas fa-2x fa-times-circle';
       return $class;
    }, 10, 2 );

    2 – You can override the template files present in the templates folder and add the new icons there manually. You could do that by copying the files from there and pasting it into a new wish-list-for-woocommerce folder you’d have to create inside your theme folder or preferably, your child theme folder.

    Here are two topics from similar questions that could help:

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