We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e5326c commit 4fe2f75Copy full SHA for 4fe2f75
wittypen-integration.php
@@ -86,8 +86,16 @@ function wittypen_display_api_key()
86
EOT;
87
}
88
89
-function wittypen_authenticate_request($result)
90
-{
+function wittypen_authenticate_request($result) {
+ // Get the current REST route
91
+ $route = $_SERVER['REQUEST_URI'];
92
+
93
+ // Check if the route matches plugin's namespace (replace 'wittypen/v1' with your actual namespace)
94
+ if (strpos($route, 'wittypen/v1') === false) {
95
+ // This is not a request related to plugin, return the original result
96
+ return $result;
97
+ }
98
99
if (!empty($result)) {
100
// Another authentication method is being used, return the result
101
return $result;
0 commit comments