Automattic\WooCommerce\StoreApi
Authentication::is_request_to_store_api()
Check if is request to the Store API.
Метод класса: Authentication{}
Хуков нет.
Возвращает
true|false
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->is_request_to_store_api();
Код Authentication::is_request_to_store_api() Authentication::is request to store api WC 7.5.1
protected function is_request_to_store_api() { if ( empty( $GLOBALS['wp']->query_vars['rest_route'] ) ) { return false; } return 0 === strpos( $GLOBALS['wp']->query_vars['rest_route'], '/wc/store/' ); }