• 
    add_action( 'rest_api_init', 'registerRestRoutes' );
    function registerRestRoutes(){
        ......
        public function getItems()
        {
            echo 'test string';
        }
    }
    

    When i call the endpoint use restful, it hava a notice:

    
    <br />
    <b>Notice</b>:  Trying to get property of non-object in <b>/home/wwwroot/trueniu-php/trueniu/wp-content/plugins/lingotek-translation/include/model.php</b> on line <b>20</b><br />
    

    This is a bug? can i solve it?

  • The topic ‘Rest_api_init bug?’ is closed to new replies.