Automattic\WooCommerce\Blocks\BlockTypes\ProductCollection
Renderer::get_location_context()
Get the global location context. Serve as a runtime cache for the location context.
Method of the class: Renderer{}
No Hooks.
Return
Array
. The location context.
Usage
// private - for code of main (parent) class only $result = $this->get_location_context();
Notes
- See: ProductCollectionUtils::parse_frontend_location_context()
Renderer::get_location_context() Renderer::get location context code WC 9.6.1
private function get_location_context() { static $location_context = null; if ( null === $location_context ) { $location_context = ProductCollectionUtils::parse_frontend_location_context(); } return $location_context; }