woocommerce_product_categories_widget_main_term filter-hookWC 1.0

Usage

add_filter( 'woocommerce_product_categories_widget_main_term', 'wp_kama_woocommerce_product_categories_widget_main_term_filter', 10, 2 );

/**
 * Function for `woocommerce_product_categories_widget_main_term` filter-hook.
 * 
 * @param  $terms[0] 
 * @param  $terms    
 *
 * @return 
 */
function wp_kama_woocommerce_product_categories_widget_main_term_filter( $terms[0], $terms ){

	// filter...
	return $terms[0];
}
$terms[0]
-
$terms
-

Where the hook is called

WC_Widget_Product_Categories::widget()
woocommerce_product_categories_widget_main_term
woocommerce/includes/widgets/class-wc-widget-product-categories.php 149
$main_term           = apply_filters( 'woocommerce_product_categories_widget_main_term', $terms[0], $terms );

Where the hook is used in WooCommerce

Usage not found.