WordPress Rest API custom endpoint optional param

Posted by Prem Tiwari | Updated on

WordPress Rest API custom endpoint optional param. There may be a way to do it with one register_rest_route function call, I do not know how to do that and it would be ideal. However, duplicating the register_rest_route function call in the hooked method will do what you want.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers