Endpoint written with add_rewrite_endpoint() returns headers already sent

That’s right @alwaysblank, we are using “roots/acorn”: “^3.1” in the theme.

You mentioned that I can try unhooking Acorn from that filter and provided a link to the SageServiceProvider class.

I managed to prevent the boot method from running when the route /jobrelay/jobfeed/ is called in the ThemeServiceProvider class and it is now returning JSON data.

Thanks for pointing me in the right direction.

2 Likes