Support » Plugins » Trailing Zero with admin-ajax calls…

  • I have started using the admin-ajax to make my admin panel pretty. The problem I am finding is that all of my Ajax calls are coming back with trailing 0’s

    It doesn’t matter what I am requesting, or even if I am making a valid request… it always returning a 0.

    I have disabled all but this plugin I am building and have looked over all of my code and I am still getting this 0.

    Is this expected behavior?

    any help would be appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I just fought with this problem for an hour before finding the (fairly) obvious solution. When you run a custom call through admin-ajax (actually, when you run almost any call through admin-ajax), after your function is run, the file executes this:


    killing execution and appending that infuriating 0. I’m sure this is for a purpose, I just haven’t taken the time to figure out what it is. to get around it, I run


    at the end of my function calls.

    Thanks for the advice, peterebutler. That was driving me crazy.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trailing Zero with admin-ajax calls…’ is closed to new replies.