I have a very simple function which used to work perfectly fine. Somehow the callback function is not called anymore:

add_action('rest_api_init', 'create_api_posts_meta_field');

function create_api_posts_meta_field()
            'get_callback' => 'get_parent_page_for_api',
            'schema' => null,

The function get_parent_page_for_api is existent and there were no changes made to the code at all. What could possibly be going wrong? Did something change since the last WordPress updates which I did miss?

I know that the function is not called since my logs inside the callback-function are not firing.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.