WordPress Simple Paypal Shopping Cart
[resolved] bad cookie domain (wrongly strip www) (3 posts)

  1. nsitbon
    Posted 3 years ago #

    Hi, when you set the cookie's domain, you wrongly strip the subdomain www hence I can't use cookie free subdomain in my website:

    $domain_url = $_SERVER['SERVER_NAME'];
    $cookie_domain = str_replace("www","",$domain_url);
    setcookie("cart_in_use","true",time()+21600,"/",$cookie_domain);  //useful to not serve cached page when using with a caching plugin

    Can you please just remove the second line?


  2. mra13
    Plugin Author

    Posted 3 years ago #

    It is done intentionally so that the cookie can be valid everywhere in your domain (including sub-domains). This seems to work better for more users out there. So I am not sure if it will be a good idea to remove it which will affect everyone else.

  3. nsitbon
    Posted 3 years ago #

    Ok, in that event, could you please provide at least an option to disable this default behaviour?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic