• Resolved Kline Lozada

    (@klinelozada)


    Hello,

    I would like to make the age verifier pop ups again when the window is closed or the browser is closed. I know that we have to flush the cookies on this but how will we able to do this please. Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Kline Lozada

    (@klinelozada)

    Ok, the current cookie does pop up after closing the session browser, is it possible to add a 24hour cookie session if the user doesn’t close it’s browser?

    What I mean is the age verifier will show up again after 24hours even if the user didn’t close the browser, if the user refreshed the page after 24hours the age verifier will show up again.

    Is it possible?
    Thanks

    Plugin Author alexstandiford

    (@alexstandiford)

    Hello @klinelozada

    There is an (undocumented, oops!) filter that allows you to customize each of the variables passed to the Javascript. this includes all of the cookie params that are set on-save.

    You can see the source here:
    https://github.com/alexstandiford/easy-age-verifier/blob/master/lib/app/verifier.php#L49

    I am pretty sure this will get you what you need – just add this to your theme’s functions.php file:

    
    add_filter('eav_cookie_parameters',function($parameters){
      return $parameters.';expires='.date('F-d-Y G:i:s',strtotime("+1 day"));
    });
    
    Thread Starter Kline Lozada

    (@klinelozada)

    Awesome! Thanks for this, i hope someone can help the thread too. Thanks again.

    Is it possible to change the 24 hours to have it so when a user closes the window or exits, then it is reset?

    Site operates normally, but if user closes window, they have to see the login again.

    Plugin Author alexstandiford

    (@alexstandiford)

    Hello @idaryl

    Something similar to what you mentioned is the default behavior. By default, Easy Age Verifier will display one time on a site and will come back after a visitor closes and re-opens their browser.

    If you’re experiencing something different I encourage you to submit a support request in a separate theread. Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to make age verifier popup again’ is closed to new replies.