Automattic\WooCommerce\Blocks\BlockTypes\ProductCollection

Renderer::get_location_context()privateWC 1.0

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() WC 9.8.5

private function get_location_context() {
	static $location_context = null;
	if ( null === $location_context ) {
		$location_context = ProductCollectionUtils::parse_frontend_location_context();
	}
	return $location_context;
}