Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Affiliate Platform – Prevent cookies from being overwritten whithin the lifetime

by

Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › WP Affiliate Tweaks › Affiliate Platform – Prevent cookies from being overwritten whithin the lifetime

Tagged: cookie, overwrite cookie

  • This topic has 7 replies, 4 voices, and was last updated 11 years, 6 months ago by admin.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • January 4, 2012 at 3:06 pm #5181
    tjark
    Member

    Hi,

    I noticed wpAffiliate overwrites cookies, which is undesirable.

    Is there a way to prevent that ?

    What we need is cookie refreshing if the original referrer is used.

    And that a cookie can only be overwritten when the lifetime has passed.

    Please let me know what to do to realize that.

    January 5, 2012 at 9:45 am #40331
    admin
    Keymaster

    Open the “wp_aff_advanced_configs.php” file and look for the following line of code:

    define('WP_AFFILIATE_DO_NOT_OVERRIDE_AFFILIATE_COOKIE', '0');

    Once you find it change it to the following:

    define('WP_AFFILIATE_DO_NOT_OVERRIDE_AFFILIATE_COOKIE', '1');

    This will make it the affiliate plugin doesn’t override the referrer cookie if one already exists for that user.

    February 21, 2012 at 11:35 pm #40332
    tekt
    Member

    Thanks this was very helpful, exactly what I came online looking for.

    November 9, 2013 at 3:19 pm #40333
    kimjcastleberry
    Member

    Clarification please…

    This particular modification…

    In the case where affiliate 1 has cookied Customer A and customer A has bought a prior product, so that affiliate 1 is set in the db for Customer A.

    Is affiliate 2 prevented from resetting cookie in the browser? (Yes/No)

    or

    Is affiliate 2 prevented from resetting the db entry (Yes/No)

    or

    Both.

    So if customer A clears their cookies, then comes back to the site, via affiliate 2’s link… and buys a new product…during the liftime of affiliate 1’s cookie, does affiliate 1 or affiliate 2 get the sale.

    I’ll be super happy if you tell me that this affects the referrer ID that’s stored in the DB, essentially giving me a locked referrer for the duration of the cookie, even if the cookie no longer exists… but I have my doubts that’s what this does.

    What I’m trying to figure out how to accomplish is to “lock” a customer to their referrer for a specified time frame (in my case, 365 days). I’m trying to figure out how to make this happen.

    Kim

    November 9, 2013 at 10:47 pm #40334
    admin
    Keymaster

    Hi Kim, It works based on the cookie. So if the cookie is gone then the connection is gone too unfortunately.

    November 10, 2013 at 10:12 am #40335
    kimjcastleberry
    Member

    What kind of financial investment would be needed to extend the code so we all have that sort of optional capability?

    November 19, 2013 at 7:02 pm #40336
    kimjcastleberry
    Member

    any thoughts on this?

    November 20, 2013 at 12:35 am #40337
    admin
    Keymaster

    Hi Kim, Sorry I missed your last post. I should be able to create a custom addon for you to handle this. Please fill out the following post with as much details as you can I will give you a quote for it:

    https://support.tipsandtricks-hq.com/need-custom-work-done

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ