''
);
$args = wp_parse_args( $query_string, $defaults );
$current_cat = get_term_by('slug', $args['product_cats'], 'product_cats');
// Gets every "category" (term) in the current taxonomy to get the respective posts
$terms = get_terms( 'product_cats', 'child_of='.$current_cat->term_id );
$count = count($terms);
// if the term has no children then show its content
if ( $count == 0 ):
$posts = new WP_Query( "taxonomy=product_cats&term=$current_cat->slug" );
?>