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 46b8cd2 commit 173d439Copy full SHA for 173d439
Services/NativeAjax/AbstractWPAjaxController.php
@@ -30,7 +30,11 @@ public function __construct(?Request $request = null)
30
}
31
32
$action = $this->request->query->get('action');
33
- if ($action) {
+ $uri = $this->request->server->get('SCRIPT_NAME', '');
34
+
35
+ // Игонорировать /wp-admin/admin.php. Иначе вызывает ложные срабатывания
36
+ // И ошибки.
37
+ if ($action && strpos($uri, '/wp-admin/admin.php') === false) {
38
$routeData = WpAjaxInitializer::route($action);
39
40
$this->request->attributes->set('methods', $routeData->getMethods());
0 commit comments