I created a simple live search plugin.
The plugin creates one table in which it data is saved and the plugin receives data from standard WordPress tables when it make search.
I used direct database access.
But I was reading that there is a requirement that access to the database should be only using the Rest API.
How I understand – I must write specific route (register_rest_route) and use WP_Query in function what will get data from data base.
I’m under the impression that WP_Query can only be used to work with standard WordPress tables.
I couldn’t figure out how to use WP_Query to get or store data in my WordPress table created specifically for my plugin.
Is this true or am I just not knowing enough WP_Query?