Hello
Thank you for sending over the link.
We were able to identify the problem.
Please edit the file called admin.php under inc folder and the function called yop_poll_back _to_vote()
Replace
if ( wp_verify_nonce( $_REQUEST['nonce'], 'yop_poll-' . $poll_id . $unique_id . '-user-actions' ) ){
if( $poll_id ) {
require_once( YOP_POLL_MODELS . 'poll_model.php' );
$yop_poll_model = new YOP_POLL_Poll_Model ( $poll_id );
$yop_poll_model->unique_id = $unique_id;
$poll_html = do_shortcode( $yop_poll_model->return_poll_html( array(
'tr_id' => $tr_id,
'location' => $location
) ) );
if( $poll_html ) {
$message = $poll_html;
$success = $yop_poll_model->success;
}
else {
$error = $yop_poll_model->error;
}
unset ( $yop_poll_model );
}
else {
$error = __( 'Invalid Request! Try later!', 'yop_poll' );
}
}
else $error=__('Bad Request!Try again later','yop_poll');
with
if( $poll_id ) {
require_once( YOP_POLL_MODELS . 'poll_model.php' );
$yop_poll_model = new YOP_POLL_Poll_Model ( $poll_id );
$yop_poll_model->unique_id = $unique_id;
$poll_html = do_shortcode( $yop_poll_model->return_poll_html( array(
'tr_id' => $tr_id,
'location' => $location
) ) );
if( $poll_html ) {
$message = $poll_html;
$success = $yop_poll_model->success;
}
else {
$error = $yop_poll_model->error;
}
unset ( $yop_poll_model );
}
else {
$error = __( 'Invalid Request! Try later!', 'yop_poll' );
}
Also, in function yop_poll_view_results() replace the code
if ( wp_verify_nonce( $_REQUEST['nonce'], 'yop_poll-' . $poll_id . $unique_id . '-user-actions' ) ){
if( $poll_id ) {
require_once( YOP_POLL_MODELS . 'poll_model.php' );
$yop_poll_model = new YOP_POLL_Poll_Model ( $poll_id );
$yop_poll_model->unique_id = $unique_id;
$yop_poll_model->vote = true;
$poll_html = do_shortcode( $yop_poll_model->return_poll_html( array(
'tr_id' => $tr_id,
'location' => $location
) ) );
if( $poll_html ) {
$message = $poll_html;
$success = $yop_poll_model->success;
}
else {
$error = $yop_poll_model->error;
}
unset ( $yop_poll_model );
}
else {
$error = __( 'Invalid Request! Try later!', 'yop_poll' );
}
}
else
{
$error=__('Bad request!Try again later','yop_poll');
}
with
if( $poll_id ) {
require_once( YOP_POLL_MODELS . 'poll_model.php' );
$yop_poll_model = new YOP_POLL_Poll_Model ( $poll_id );
$yop_poll_model->unique_id = $unique_id;
$yop_poll_model->vote = true;
$poll_html = do_shortcode( $yop_poll_model->return_poll_html( array(
'tr_id' => $tr_id,
'location' => $location
) ) );
if( $poll_html ) {
$message = $poll_html;
$success = $yop_poll_model->success;
}
else {
$error = $yop_poll_model->error;
}
unset ( $yop_poll_model );
}
else {
$error = __( 'Invalid Request! Try later!', 'yop_poll' );
}
Let us know if that fixes your issue.
Best
YOP Team