diff --git a/src/Loader.php b/src/Loader.php index 1ecb78e..071888f 100644 --- a/src/Loader.php +++ b/src/Loader.php @@ -115,8 +115,7 @@ function is_graphql_request() if ( isset( $_SERVER['HTTP_HOST'] ) && isset( $_SERVER['REQUEST_URI'] ) ) { $haystack = wp_unslash( $_SERVER['HTTP_HOST'] ) . wp_unslash( $_SERVER['REQUEST_URI'] ); - $needle = \home_url( \WPGraphQL\Router::$route ); - + $needle = site_url( self::$route ); // Strip protocol. $haystack = preg_replace( '#^(http(s)?://)#', '', $haystack ); $needle = preg_replace( '#^(http(s)?://)#', '', $needle );