Term logic fix
This commit is contained in:
parent
cc18f85baa
commit
52c4d21d18
|
@ -1710,6 +1710,12 @@ if ( ! function_exists( 'woocommerce_products_will_display' ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'subcategories' === $display_type ) {
|
if ( 'subcategories' === $display_type ) {
|
||||||
|
if ( is_product_category() ) {
|
||||||
|
$term = get_queried_object();
|
||||||
|
if ( $term && ! count( get_term_children( $term->term_id, $term->taxonomy ) ) ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue