I'm facing a weird issue with a Wordpress installation and I'm not sure how to proceed further. I've developed a simple AJAX endpoint only available for logged in userusers, which returns the detaildetails of a custom post type associated with the user. Example:
The problem is that as soon as I switch to another page it returnsthe whole front-end starts returning an error:
define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );