Replies: 0
While doing some theme development with Disqus installed I’ve noticed that calling ‘get_rest_url()’ with a blog ID was always returning the main site URL (i.e: get_rest_url( 2 ) ).
After some debugging I’ve traced the issue to this filter:
$this->loader->add_filter( 'rest_url', $plugin_admin, 'dsq_filter_rest_url' );
The callback is ALWAYS overriding the input URL causing issues whenever I want to return a REST API URL from a sub-site.
Please add some logic so that the URL is only overriden when your endpoints are being used, otherwise this can break site functionality.
I had to disable the filter to be able to get the correct sub-site REST API URL.
Thanks!