• Resolved stamatakis

    (@stamatakis)


    Hello! I am trying to put a counter of the wishlist on my menu but i get a fatal error with the code bellow:

    function yith_wcwl_ajax_update_count(){
    	wp_send_json( array(
    		'count' => yith_wcwl_count_products(),
    	) );
    }
    add_action( 'wp_ajax_yith_wcwl_update_wishlist_count', 'yith_wcwl_ajax_update_count' );
    add_action( 'wp_ajax_nopriv_yith_wcwl_update_wishlist_count', 'yith_wcwl_ajax_update_count' );

    Did I type something wrong.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi there

    the code that you posted shouldn’t cause any issue on your site
    I even tested it on my local installation, and I was able to successfully run the ajax call you defined (check my screenshot)

    Regarding the counter, I suggest you to check this article from our knowledgebase

    Thread Starter stamatakis

    (@stamatakis)

    Sorry it was my fault. It was right! Thank you about your time.

    Plugin Author YITHEMES

    (@yithemes)

    You’re welcome!

    If you enjoy our plugin, don’t forget to leave us a 5 star review, to support us and help our work
    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Wishlist Counter’ is closed to new replies.