woocommerce_shortcode_products_query
Usage
add_filter( 'woocommerce_shortcode_products_query', 'wp_kama_woocommerce_shortcode_products_query_filter', 10, 3 ); /** * Function for `woocommerce_shortcode_products_query` filter-hook. * * @param $query_args * @param $attributes * @param $type * * @return */ function wp_kama_woocommerce_shortcode_products_query_filter( $query_args, $attributes, $type ){ // filter... return $query_args; }
- $query_args
- -
- $attributes
- -
- $type
- -
Where the hook is called
woocommerce_shortcode_products_query
woocommerce/includes/shortcodes/class-wc-shortcode-products.php 237
$query_args = apply_filters( 'woocommerce_shortcode_products_query', $query_args, $this->attributes, $this->type );
Where the hook is used in WooCommerce
woocommerce/includes/class-wc-brands.php 770
add_filter( 'woocommerce_shortcode_products_query', array( __CLASS__, 'get_brand_products_query_args' ), 10, 3 );
woocommerce/includes/class-wc-brands.php 776
remove_filter( 'woocommerce_shortcode_products_query', array( __CLASS__, 'get_brand_products_query_args' ), 10 );
woocommerce/includes/class-wc-template-loader.php 412
add_filter( 'woocommerce_shortcode_products_query', array( __CLASS__, 'unsupported_archive_layered_nav_compatibility' ) );
woocommerce/includes/class-wc-template-loader.php 414
remove_filter( 'woocommerce_shortcode_products_query', array( __CLASS__, 'unsupported_archive_layered_nav_compatibility' ) );