• Resolved stevesand

    (@stevesand)


    Hi, thank you for a great plugin!

    I encountered a bug when trying to create filters, the buttons for adding filters/rows are not working. After debugging I found that the issue is caused by how the nonce is retrieved in:
    woo-product-feed-pro/static/js/woosea_filters_rules.js:

    const nonce = $(‘#_wpnonce’).val();

    Since there are multiple elements with the id #_wpnonce on the page (one for each form), the filter-form will pick up the wrong nonce from another form, causing the AJAX requests to fail. If you instead scope the selector to the specific form, like this:

    const nonce = $(‘form#filters_rules #_wpnonce’).val();

    it works correctly. I have made this change locally, but it will be overwritten on update. I’m using the legacy filter feature, if that is relevant.

    Hopefully this can be fixed for the next update.

Viewing 1 replies (of 1 total)
  • Plugin Support Fauzan Azizie

    (@fauzanade)

    Hi @stevesand,

    Thanks for debugging this and sharing the fix — really helpful!

    You’re spot on. The unscoped $(‘#_wpnonce’).val() grabs the first match on the page, which ends
    up being the wrong nonce when other plugins have their own forms on the same page. We’ve applied
    your fix (plus the same change in a couple of other spots in the file) and it’ll be included in the next
    update.

    Cheers!

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.