Support » Plugin: Yasr - Yet Another Stars Rating » Can we have unique cookie names?

  • Resolved johnh10

    (@johnh10)


    I have several sites running YASR, but the function checkCookie all share the same cookie name of ‘yasr_visitor_vote_cookie’.

    Some of my visitors are voting on site A on a certain post ID, and on the same post ID on site B they are being denied with the message ‘they already voted’ when that is not the case.

    I assume this is because the cookie name is the same. Can we get the name to be unique to the site YASR is installed on? Or at least wrap the cookie name in a filter call so we can change it ourselves.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author dudo

    (@dudo)

    Hi!

    I will add a filter in the next version.

    Are you using multisite?
    If so, in the function yasr_setcookie can you please try to replace COOKIE_DOMAIN with DOMAIN_CURRENT_SITE ?

    Best,
    Dario

    No, not multisite. Just different domains but of course there can be the same post IDs on multiple sites.

    Filter would be great! Thank you.

    Plugin Author dudo

    (@dudo)

    This is done and will be available in the next version.

    News hooks:

    yasr_vv_cookie //this will filter the cookie name that save yasr_visitor_votes 
      
    yasr_mv_cookie //same as above but for yasr_visitor_multiset
    

    Best,
    Dario

    • This reply was modified 4 months, 2 weeks ago by dudo.
    • This reply was modified 4 months, 2 weeks ago by dudo.
    Plugin Author dudo

    (@dudo)

    The filters are available with version 2.4.6 😉

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.