• Hello There,
    my plugin after activation set up some cookie for 10 years. any way how to save it, since after logout cookie deleted. Would you advice how to avoid that?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Is this a plugin you wrote yourself? Do you want to share the code so we can look at it?

    I’m not aware that WordPress would delete your cookie when you logout.

    Thread Starter Taanab

    (@taanab)

    Yes, this is my first plugin. Sure, I gonna put it to GitHub now and will share a link.

    Thread Starter Taanab

    (@taanab)

    Here you can see the code

    Upon plugin deactivation your plugin appears to set the cookie expiry time to be in the past – is it not this that’s causing it to be deleted?

    Thread Starter Taanab

    (@taanab)

    Do you think deactivation hook fire every time when logout happening?

    Thread Starter Taanab

    (@taanab)

    But it definitely something wrong with my code, I should review that

    Thread Starter Taanab

    (@taanab)

    I believe it because I continue using local variables, will rewrite it

    No, that was my fault – I got confused between deactivating a plugin and logging out. You’re right, logging out shouldn’t cause this, however it sounds as if you have a better idea yourself of what to look at.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Custom cookie deleted’ is closed to new replies.