Incorrect Message : Notice: register_rest_route was called

So, I see this notice in my plugin : Notice: register_rest_route was called incorrectly. Namespace must not start or end with a slash.

The point to note is that my namespace is myplugin/v1 and does not start or end with a slash.
I also confirmed with by adding a print_r($namespace); and die();

Someone just put a wrong error message or is there some real problem in my code. Please help me out.

  • This topic was modified 1 day, 21 hours ago by t-p. Reason: Moved to Fixing WordPress from Developing with WordPress



Source link