Automattic\WooCommerce\Blocks\BlockTypes\ProductCollection
Renderer::get_location_context
Get the global location context. Serve as a runtime cache for the location context.
Метод класса: Renderer{}
Хуков нет.
Возвращает
Массив. The location context.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_location_context();
Заметки
- Смотрите: ProductCollectionUtils::parse_frontend_location_context()
Код Renderer::get_location_context() Renderer::get location context WC 10.5.0
private function get_location_context() {
static $location_context = null;
if ( null === $location_context ) {
$location_context = ProductCollectionUtils::parse_frontend_location_context();
}
return $location_context;
}