Forums

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

  1. nsitbon
    Member
    Posted 7 months 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?
    Thanks.

    http://wordpress.org/extend/plugins/wordpress-simple-paypal-shopping-cart/

  2. mra13
    Member
    Plugin Author

    Posted 7 months 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
    Member
    Posted 7 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic