Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Pippin Williamson

    (@mordauk)

    That can be true, though it depends on the output.

    What is the output, do you know?

    Thread Starter Stefano

    (@ste_95)

    In my case, they were PHP notices.

    Plugin Contributor Pippin Williamson

    (@mordauk)

    Notices will often cause ajax requests to break (for all plugins). The best way to fix that is to fix the cause of the notices.

    Thread Starter Stefano

    (@ste_95)

    I solved this very problem in my plugin by making each request return ‘ok’ when successful and then looking for that ‘ok’ in the javascript caller function. This way, whatever output there may be (even your own plugin legitimate one), as long as the ‘ok’ is found, no problems arise.

    Unfortunately, even though I expect all plugins to be notice free and all, they are not, so I believe it is better to design plugins to deal with this.

    Plugin Contributor Pippin Williamson

    (@mordauk)

    Unfortunately, even though I expect all plugins to be notice free and all, they are not, so I believe it is better to design plugins to deal with this.

    Absolutely, and we do the best we can.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘AJAX Add to Cart doesn't work if admin-init has output?’ is closed to new replies.