Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter roryfunction28

    (@roryfunction28)

    Hi,

    Thanks for your response.

    I was deleting permanently.

    However, I followed your advice of using wp_die() as my way of checking execution, and I actually started getting a response. Thanks very much for that suggestion. I used this to debug my issue. Issue turned out to be my side in the end. As I worked my way through it, it turned out to be stupidly simple: it wasn’t accessing the json file! It was supposed edit the one I’d set, but it was supposed to iterate over another one too, and it wasn’t doing that because… I didn’t tell it to!

    Wouldn’t have been able to get there without your wp_die() suggestion. I was trying to debug it to find the failure point by writing to console, but yeah, as you suggested, the browser wasn’t expecting output. My echo’d console.log didn’t fire until wp_die() was invoked, at which point using the console was redundant.

    I wasn’t aware of wp_die() before this. This is a far better way for me to test and debug, since it prevents the final execution, meaning I don’t have to reset the conditions (e.g. creating and deleting posts).

    Cheers!

Viewing 1 replies (of 1 total)