woocommerce_product_categories_widget_main_term

woocommerce_product_categories_widget_main_term

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_product_categories_widget_main_term') is found 1 times:

  • /includes/widgets/class-wc-widget-product-categories.php line 149
    				)
    			);
    
    			if ( $terms ) {
    				$main_term           = apply_filters( 'woocommerce_product_categories_widget_main_term', $terms[0], $terms );
    				$this->current_cat   = $main_term;
    				$this->cat_ancestors = get_ancestors( $main_term->term_id, 'product_cat' );
    			}
    		}
    
    		// Show Siblings and Children Only.