Automattic\WooCommerce\StoreApi
Authentication::is_preflight()
Is the request a preflight request? Checks the request method
Метод класса: Authentication{}
Хуков нет.
Возвращает
true|false
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->is_preflight();
Код Authentication::is_preflight() Authentication::is preflight WC 9.6.0
protected function is_preflight() { return isset( $_SERVER['REQUEST_METHOD'], $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'], $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'], $_SERVER['HTTP_ORIGIN'] ) && 'OPTIONS' === $_SERVER['REQUEST_METHOD']; }