Cant register rest routs from class instance
There’s several things wrong here, none really related to OOP. Firstly, you seem to be attempting to register the REST routes on plugin activation. This is incorrect. Routes need to be registered for every request, so BusinessCustomersApiController->register_routes() needs to run on every request. You do this by hooking that function to the rest_api_init. The problem … Read more