helpful_verify_{name}_nonce

This filter allows disabling nonces for Ajax requests, improving compatibility with caches. In return, Helpful is slightly less secure when the nonces are disabled. You can also find this option in Helpful’s settings under System > Miscellaneous.

Frontend

/**
 * Disables nonces for simple voting.
 *
 * @param bool $status
 * @return bool
 */
add_filter('helpful_verify_frontend_nonce', function (bool $status) {
    $status = false;
    return $bool;
});

// Alternative usage:
add_filter('helpful_verify_frontend_nonce', '__return_false');

Feedback


/**
 * Disables nonces for the feedback form
 *
 * @param bool $status
 * @return bool
 */
add_filter('helpful_verify_feedback_nonce', function (bool $status) {
    $status = false;
    return $bool;
});

// Alternative usage:
add_filter('helpful_verify_feedback_nonce', '__return_false');

Was this post helpful?

Top