WordPress at Your Fingertips
function is not described

WC_Query::get_main_meta_query() public WC 1.0

Get the meta 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_meta_query();

Code of WC_Query::get_main_meta_query() WC 5.6.0

public static function get_main_meta_query() {
	$args       = self::$product_query->query_vars;
	$meta_query = isset( $args['meta_query'] ) ? $args['meta_query'] : array();

	return $meta_query;
}