• Custom rest-api routes don’t return as JSON with breeze enabled.

    register_rest_route( 'app/v3', '/home', array(
            'methods' => 'GET',
            'callback' => 'appinfo_home',
    ) );
    function appinfo_home() {
        $data = [
                'info'	=> appinfo_func(),
                'stories' 	=> stories_func()
        ];
        return new WP_REST_Response($data, 200);
    }

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Breeze not return’ is closed to new replies.