WordPress at Your Fingertips
function is not described

WC_Query::get_main_tax_query() public WC 1.0

Get the tax query which was used by the main query.

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

No Hooks.

Return

Array.

Usage

$result = WC_Query::get_main_tax_query();

Code of WC_Query::get_main_tax_query() WC 5.6.0

public static function get_main_tax_query() {
	$tax_query = isset( self::$product_query->tax_query, self::$product_query->tax_query->queries ) ? self::$product_query->tax_query->queries : array();

	return $tax_query;
}