woocommerce_price_filter_post_type
Использование
add_filter( 'woocommerce_price_filter_post_type', 'wp_kama_woocommerce_price_filter_post_type_filter' ); /** * Function for `woocommerce_price_filter_post_type` filter-hook. * * @param $array * * @return */ function wp_kama_woocommerce_price_filter_post_type_filter( $array ){ // filter... return $array; }
- $array
- -
Где вызывается хук
woocommerce_price_filter_post_type
woocommerce/includes/widgets/class-wc-widget-price-filter.php 177
WHERE {$wpdb->posts}.post_type IN ('" . implode( "','", array_map( 'esc_sql', apply_filters( 'woocommerce_price_filter_post_type', array( 'product' ) ) ) ) . "')