Recent Visitors For BuddyPress Profile – Showing double visits

  • Participant
    Level: Enlightened
    Posts: 27
    studioleland on #15978

    I’m not really getting anywhere with host or with my own investigation. Could I modify the counter to only count visits happening 1 time within a time threshold. For example 5 minutes. So even if they are 1 second apart it will not recount?

  • Participant
    Level: Enlightened
    Posts: 27
    studioleland on #15986

    Added temporary fix via following condition:

    if( time() - strtotime($myvisitor->visit_time) < 3601) {
    			echo '<script>console.log("Visit too soon!")</script>';

    The strange extra visits were coming from the default Woocommerce install. Woocommerce has added an image preloader of some kind.

  • Keymaster
    (BuddyDev Team)
    Posts: 22564
    Brajesh Singh on #15987

    Hi Leland,
    Thank you for finding out. When I have some time, I will love to see the new feature in wooCommerce.

    In the mean time, Please do not echo the script. Simply return.

You must be logged in to reply to this topic.

This topic is: not resolved