WordPress at Your Fingertips
function is not described

WC_Query::get_main_query() public WC 1.0

Get the main query which product queries ran against.

{} It's a method of the class: WC_Query{}

No Hooks.

Return

WP_Query.

Usage

$result = WC_Query::get_main_query();

Code of WC_Query::get_main_query() WC 5.6.0

public static function get_main_query() {
	return self::$product_query;
}