Automattic\WooCommerce\Blocks\BlockTypes

ProductCollection::get_location_context()privateWC 1.0

Get the global location context. Serve as a runtime cache for the location context.

Method of the class: ProductCollection{}

No Hooks.

Return

Array. The location context.

Usage

// private - for code of main (parent) class only
$result = $this->get_location_context();

Notes

ProductCollection::get_location_context() code WC 9.4.2

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