0

I tried debug plugins for WordPress, but they only show the current page SQL queries. How to debug if update_option returns false?

I am updating an object decoded from AJAX request with json_decode although I doubt it has anything to do with it.

  • 3
    it would be helpful to see code, something we can test, or anything.... – Milo Jan 13 at 16:18
  • 1
    Can you add the code where you register your ajax request handlers, the ajax function code and also the script where you actually call the action function. – Cyclonecode Jan 13 at 17:49
0

I found out that my settings where filtered by validation function registered by register_setting. Somehow I thought that it would only affect settings that where going through wordpress's own settings fields and not a custom AJAX function (the way I have it setup).

To the point of the question: I used php exit to debug the AJAX. update_option returned false because the options fields where the same after validation (I was missing out one particular setting)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.