woocommerce_product_query_meta_query

The woocommerce woocommerce product query meta query hook.

Published Date - May 18, 2021

Description

return array_filter( apply_filters( 'woocommerce_product_query_meta_query', $meta_query, $this ) );

Parameters

  1. $meta_query

  2. $instance


Usage

The following example is for adding a hook callback.

// define the woocommerce_product_query_meta_query callback 
function custom_woocommerce_product_query_meta_query( $meta_query, $instance ){ 
   //custom code here
    return $meta_query
} 

//add the action 
add_filter('woocommerce_product_query_meta_query', 'custom_woocommerce_product_query_meta_query', 10, 2)

Defined

The filter is defined in the following location(s).

woocommerce/includes/class-wc-query.php

return array_filter( apply_filters( 'woocommerce_product_query_meta_query', $meta_query, $this ) );