To anyone else reading, here’s how it works.
This plugin disables the WP Rest API for non-logged users. So plugins that require REST API for non-logged users are not going to work. Like a car won’t run without an engine, or a bird can’t fly without wings. For example, as @hendrik57 points out, Contact Form 7 plugin relies on REST API for non-logged users, so naturally it’s not going to work when you disable REST API via this plugin. Why give the plugin a one-star rating for doing its job perfectly. Looking at you, @hendrik57.
What about adding custom code to the plugin, so that Contact Form 7 will work? The stated mission of this plugin is to disable the REST API in the lightest, fastest way possible. So yeah, I could add some more code all special just so CF7 will work. But that sets a precedent. Users of other REST-requiring plugins will request similar special treatment for their chosen plugin(s), just like CF7. So the once-simple disable-REST plugin gets more complex, more code, more management, etc. And guess what, there are thousands of plugins that make use of the REST API. Should I break my back trying to support them all?
No I shouldn’t. Because there are other disable-REST plugins that provide more functionality and can be configured to allow for Contact Form 7 or any other plugins that may require REST API. Alternately, there are many plugins that do not require the REST API for anything.
So to sum up, you have the following options when it comes to the WP REST API:
- Use this plugin, Disable WP REST API to disable REST for everyone who is not logged in to WordPress
- Use a more advanced plugin such as Disable REST API to configure REST access to allow for plugins like Contact Form 7
- Or simply don’t disable REST API, so all REST-dependent plugins like Contact Form 7 will work normally
Also should mention the CF7 REST addon. As explained there in the post, the CF7 addon enables Contact Form 7 to work even when REST API is disabled. Unfortunately, the addon doesn’t work completely with newer versions of CF7. Visitors can still send messages, but the resulting success and error messages are not displayed on the page. Presumably because there is some other use of REST API happening there. I am looking into it, but so far it seems like something that will need worked out on the CF7 side of things. I will sticky post in the plugin forum if any solution is possible.