• Resolved Jason Wong

    (@eljkmw)


    I noticed that the Wishlist button’s “data-tip” is reading the $label text in the anchor tag <a href> .. </a>. My goal is to remove that text and have the heart icon remained, while still showing “Add to Wishlist” in the tooltip.

    I’ve been searching throughout this plugin’s files, and I cannot find any of them that contains “data-tip” or “tooltip”.

    Please help. Thank you.

Viewing 1 replies (of 1 total)
  • Thread Starter Jason Wong

    (@eljkmw)

    Apparently I just found that my theme’s main.js is automatically inserting the “data-tip”. Its JavaScript is as shown …

    $('.yith-wcwl-add-button.show').each(function(){
        var tip_message = $(this).find('a.add_to_wishlist').text();
        $(this).find('a.add_to_wishlist').attr('data-tip',tip_message).addClass('tip-top');
    });

    To get around this,

    • Duplicate ‘/plugins/yith-woocommerce-wishlist/templates/add-to-wishlist-button.php’ to ‘/themes/active-theme/woocommerce/add-to-wishlist-button.php’
    • Add a SPAN tag around $label, like so <span><?php echo $label ?></span>
    • And, include a custom CSS .product-info .yith-wcwl-add-to-wishlist a span { display: none; } into the active-theme’s style.css
Viewing 1 replies (of 1 total)
  • The topic ‘How to change “data-tip” for Wishlist button?’ is closed to new replies.