How to switch from FontAwesome to some other solution?

Home Forums Wish List for WooCommerce How to switch from FontAwesome to some other solution?

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

    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.

    #100284
    Pablo Pacheco
    Participant

    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';
             break;
          case 'twitter':
             $class = 'fab fa-twitter-square';
             break;
          case 'google_plus':
             $class = 'fab fa-google-plus-square';
             break;
          case 'email':
             $class = 'fas fa-envelope-square';
             break;
          case 'copy':
             $class = 'fas fa-copy';
             break;
          case 'remove_btn':
             $class = 'fas fa-2x fa-times-circle';
             break;
       }
       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:

    https://wordpress.org/support/topic/fontawesome-11/
    https://wordpress.org/support/topic/the-wish-list-is-empty/

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