• Resolved nartoof

    (@nartoof)


    Hi,

    I’d like to display the number of items in the wishlist on my website header.

    Do you have any tip to get this into a variable using PHP or Jquery ?

    Thank you very much.

    Anthony

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

    (@yithemes)

    Hi Anthony

    The easiest way is to use yith_wcwl_count_products() function
    This will return an integer, representing number of items in default wishlist for current user

    Plese, make sure to check function existance in your code before actually calling it:

    $count = 0;
    if( function_exists( 'yith_wcwl_count_products' ) ){
        $count = yith_wcwl_count_products();
    }
    
    Thread Starter nartoof

    (@nartoof)

    Hi @yithemes

    Thank you for your answer.

    It works perfectly !!

    Here is a screen for a feedback ?? : Screen

    Thank you very much !!

    Anthony

    Plugin Author YITHEMES

    (@yithemes)

    You’re welcome!

    We are doing our best to improve our plugins. Our target is to develop and release the best free plugins for WooCommerce, but to achieve this we need your help. Please leave a good review to support us and help our growth ??

    Thread Starter nartoof

    (@nartoof)

    Done ??

    Thanks again !

    Have a nice day.

    Anthony

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Get number of item in the wishlist’ is closed to new replies.