Term logic fix

This commit is contained in:
Mike Jolley 2017-11-09 12:09:11 +00:00
parent cc18f85baa
commit 52c4d21d18
1 changed files with 6 additions and 0 deletions

View File

@ -1710,6 +1710,12 @@ if ( ! function_exists( 'woocommerce_products_will_display' ) ) {
}
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;
}