WordPress.org

Ready to get started?Download WordPress

Forums

YOP Poll
cookies (2 posts)

  1. agent14
    Member
    Posted 4 months ago #

    where is the cookie information stored? i would like to use a php script to determine if the user has already voted by cookie (yes i know its a feature of the plugin - but i am trying a workaround for multiple/duplicate votes, and sending the user to a different poll if needed.

    so is it possible? i already have it coded by i.p, i just need to know how to access the cookie info for this plugin.

    thanks.

    p.s - i know i've asked plenty questions lol. sorry. hopefully others will benefit from my questions also!

    https://wordpress.org/plugins/yop-poll/

  2. YOP
    Member
    Plugin Author

    Posted 4 months ago #

    Hi agent14,

    In inc/yop_poll_model.php there is the is_voted_cookie function that verified if the poll has any votes.

    You can check if there are votes for that poll by verifying if $_COOKIE['yop_poll_voted_POLL_ID'] is set, where POLL_ID if the ID for that particular poll.

    Best wishes,

    YOP Team

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.