FnClick
  • Portfolio
  • Services
    • Social Media Marketing
    • SEO
    • Web development
  • About us
    • Training
  • Blogs
  • Careers
GET IN TOUCH
  • Event Tracking

    • Google

      • Gtag.js
      • Analytics.js
    • Facebook

      • Facebook Event Tracking
    • General

      • Contact Form 7 Tracking
  • Scripts

    • Add font resizer
    • Current time in Devanagari/Nepali
    • Read More Function (Show / Hide)
  • Shopify

    • Additional information tab
  • WordPress

    • Download File after the form submit
    • GIFs as Favicon
    • First content image as Featured Image on listing page
    • Add Table of Content (TOC)
    • Content Image popup
    • Add estimated Read Time
    • Repeater field in Customizer
    • Display Publish Dates as ”Time Ago”
    • Breadcrumb
    • Show images on sub-menu navigation
    • Contact form 7 redirects
    • Universal .htaccess Directives
    • Number Pagination
    • Dynamic Breadcrumb List
  • WooCommerce

    • Update the Wishlist counts without reload
    • WooCommerce Product Schema
  • Server Rules

    • Apache

      • Expire header Rules
      • Redirect Rules
WooCommerce

Update the Wishlist counts without reload

This code will automatically update the total wishlist count without that page reloading. Add the below code to the functions.php file

if ( defined( 'YITH_WCWL' ) && ! function_exists( 'yith_wcwl_get_items_count' ) ) {
  function yith_wcwl_get_items_count() {
    ob_start();
    ?>
      <a class="link-wrap" href="<?php echo esc_url( YITH_WCWL()->get_wishli