Disable query monitor output on frontend for specific pages/urls

[ad_1]

Hey! I’m having an issue where query monitor is breaking some ajax requests on the frontend.

Essentially I’m serving a JSON object from a frontend URL, so not admin-ajax.php, with a specific param added to the URL to flag this, and query monitor appends its usual output the to the request after my JSON object breaking my JS.

Is there a way to disable this conditionally?

I tried returning an empty array in this filter qm/dispatchers with a priority of 100 but that didn’t seem to do anything.

Thanks!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer