• Hi there,
    I’d like to disable the woocommerce_recently_viewed cookie and found this function:

    add_filter( 'woocommerce_recently_viewed_product_cookie_lifetime', 'disable_recently_viewed_cookie' );
    function disable_recently_viewed_cookie( $lifetime ) {
    return 0;
    }

    … that does not work, unfortunately. Any other options?

    Cheers,
    -martin

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Rajesh K. (woo-hc)

    (@rajeshml)

    Hello @mniggemann,

    For reference, this particular forum is meant for general support with the core functionality of WooCommerce itself. For development and custom coding questions, it’s best to ask for insight related to those on either the?WooCommerce Advanced Facebook group?or the?WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:

    I wish I could help more, but hopefully, this gets you going in the right direction to get some further insight/information.

    Saif

    (@babylon1999)

    The cookie is set because there’s an active “Recently Viewed Products” widget (or something similar). Disabling this with code will break the widget. Instead, look for the following block (or anything similar) on your store pages/widgets and remove it. ??

    https://imgur.com/a/VXy8JCy

    Thread Starter mniggemann

    (@mniggemann)

    Hey @babylon1999

    Thanx for the heads up, could well be that we’ve got a widget somewhere in there, that we forgot about 8-/

    Cheers!
    -M

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.