WC_Query::get_main_query
Get the main query which product queries ran against.
Method of the class: WC_Query{}
No Hooks.
Returns
WP_Query.
Usage
$result = WC_Query::get_main_query();
WC_Query::get_main_query() WC Query::get main query code WC 10.8.1
public static function get_main_query() {
return self::$product_query;
}