Hi @alexsmithbr,
Thanks for reaching out Members Support Team!
Please elaborate more about the issue so I can provide proper help.
Regards,
Okay. Here’s the scenario:
I have a website which uses MemberPress and I have the Members plugin installed as well. I have a page where I have WP Grid Builder showing a map. When clicking the map markers, an AJAX call is fired and it creates a WP_Query on the backend, which should return data to populate the map pop-up.
When a logged-in user accesses this page, the ajax call works just fine and the WP_Query() call returns the desired data.
When a not-logged-in user accesses this page, the ajax call fails due to the fact WP_Query() returning no rows.
If I disable the Members plugin, the map works in both situations.
I know it’s WP Grid Builder and it has apparently nothing to do with Members, but the problem is not in WP Grid Builder. It is in WP_Query(), possibly influenced by Members somehow.
So in the end my question is: does Members set something regarding non-logged-in users in a way it can intercept queries and allow/deny them?
Let me know if you need further information. I’m happy to help.
Hi @alexsmithbr,
I checked with dev team:
Please try updating to the latest version and ensure the new setting to hide protected content from the API is not enabled.
Regards,
Thank you very much! Disabling that checkbox in settings solved the problem.
Hide Protected Posts from WP REST API: Block protected posts from showing in the REST API requests.