• Resolved ouija

    (@ouija)


    Hey,

    Found that by using the rest_url_prefix filter to change the default wp-json api URL breaks the WP API Swagger UI plugin, resulting in a The site is experiencing technical difficulties. message when viewing the docs url.

    This is the filter for reference:

    add_filter( 'rest_url_prefix', 'my_theme_api_slug'); 
    function my_theme_api_slug( $slug ) { return 'api'; }
    

    Update: Nevermind, turns out the error was being thrown by another function that was causing the documents url to fail to load when the default api url was changed. My apologies!

    • This topic was modified 5 years ago by ouija. Reason: Updated
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Changing default ‘rest_url_prefix’ breaks plugin’ is closed to new replies.