woocommerce_breadcrumb_main_term

woocommerce_breadcrumb_main_term

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_breadcrumb_main_term') is found 1 times:

  • /includes/class-wc-breadcrumb.php line 163
    				)
    			);
    
    			if ( $terms ) {
    				$main_term = apply_filters( 'woocommerce_breadcrumb_main_term', $terms[0], $terms );
    				$this->term_ancestors( $main_term->term_id, 'product_cat' );
    				$this->add_crumb( $main_term->name, get_term_link( $main_term ) );
    			}
    		} elseif ( 'post' !== get_post_type( $post ) ) {
    			$post_type = get_post_type_object( get_post_type( $post ) );