Support » Plugin: Disable REST API » Add support for caos plugin

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Dave McHale


    Hey there @ipajen

    I’m not familiar with CAOS but took a quick look through their code to try and see what could be causing the issue you’re having. I think I may have found the problem.

    To help explain : REST endpoints aren’t really created with any kind of permanence for WordPress, meaning a developer does not run something once to say “hey, please register $PATH to do $FUNCTION any time someone wants it” and it’s saved to the WordPress config. Rather, plugin code has to tell WordPress EVERY PAGE LOAD, “hey, please register ____ to do _____”. It’s happening on the fly all the time.

    The developer of CAOS has chosen to register their API endpoints ONLY when a pageload is happening on the FRONTEND of the website (inside a PHP class which only gets created when it fails an is_admin() check), which is why this is causing an issue for your needs. When the Disable REST API plugin asks WordPress “please tell me what all the registered REST API routes are so that we can output them on this page and assign permissions to them on this Settings screen”, those CAOS endpoints quite simply don’t exist, BECAUSE we are in the admin area.

    I can understand where the devs were coming from in making that decision, but it also seems a bit unnecessary IMO and unfortunately there’s nothing I can do about it from my end (at least, not that I can think of off the top of my head). Perhaps you could reach out to them and explain what you’re trying to do, and see if they would consider changing their code? Best of luck!

    Thread Starter ipajen


    Thanks for your replay, made a ticket

    Plugin Author Dave McHale


    No problem, and looks like he already replied saying he may make an update so great news for you! I’m going to close this thread now. Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add support for caos plugin’ is closed to new replies.