Code Duplication    Length = 4-4 lines in 2 locations

includes/wc-template-functions.php 2 locations

@@ 164-167 (lines=4) @@
161
162
		$term = get_term_by( 'slug', esc_attr( get_query_var('product_cat') ), 'product_cat' );
163
164
		if ( $term ) {
165
			$feed = add_query_arg( 'product_cat', $term->slug, get_post_type_archive_feed_link( 'product' ) );
166
			echo '<link rel="alternate" type="application/rss+xml"  title="' . esc_attr( sprintf( __( 'New products added to %s', 'woocommerce' ), $term->name ) ) . '" href="' . esc_url( $feed ) . '" />';
167
		}
168
	} elseif ( is_tax( 'product_tag' ) ) {
169
170
		$term = get_term_by('slug', esc_attr( get_query_var('product_tag') ), 'product_tag');
@@ 172-175 (lines=4) @@
169
170
		$term = get_term_by('slug', esc_attr( get_query_var('product_tag') ), 'product_tag');
171
172
		if ( $term ) {
173
			$feed = add_query_arg('product_tag', $term->slug, get_post_type_archive_feed_link( 'product' ));
174
			echo '<link rel="alternate" type="application/rss+xml"  title="' . sprintf(__( 'New products tagged %s', 'woocommerce' ), urlencode($term->name)) . '" href="' . esc_url( $feed ) . '" />';
175
		}
176
	}
177
}
178