• eragonsoftware

    (@eragonsoftware)


    Hi, I’ve seen that there was a similar topic about a year ago, but you’ve closed it to replies, the thing is, this issue has not been resolved, the search button/all its functions worked just fine until a few days ago, when it started displaying “Permissions check failed.” instead of retrieving the products, on the site indicated above.

    I tried with PHP 7.4.33, 8.0, 8.1, 8.2, caches on and off, nothing changes. The WPC Ajax Search no longer works.
    There’s no error message in the browser’s console.

    Any help would be greatly appreciated, this is a production site and some visitors love that search functionality.

    Thank you

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • phil

    (@philharmonicmoto)

    I have the same issue for months, contacted support and they did nothing.

    • This reply was modified 9 months, 3 weeks ago by phil.
    Thread Starter eragonsoftware

    (@eragonsoftware)

    The issue is coming from the fact that “nonce” is not transmitted via the request, as you can see in the wpc-ajax-search.php, here’s the part that displays the error:

    if ( ! isset( $_POST[‘nonce’] ) || ! wp_verify_nonce( $_POST[‘nonce’], ‘wpcas-security’ ) ) {
    die( ‘Permissions check failed.’ );
    }
    This same check is executed in 3 functions, ajax_search(), ajax_add_rule() and ajax_add_condition().

    Maybe something changed in recent wordpress versions, and a different way to transmit the nonce should be used ?

    Thread Starter eragonsoftware

    (@eragonsoftware)

    Here’s a thought for the creator(s) of the plugin: why not check if user is logged in or not, and if logged in, use wp_ajax, and if not logged in, use wp_ajax_nopriv ?
    Maybe it will solve the nonce permission issue ?
    In other words, just like on frontpage, no nonce is visibly transmitted in case of loading pages, posts, products, same could be done here. Right ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Permissions check failed.’ is closed to new replies.