Code Duplication    Length = 7-7 lines in 2 locations

includes/widgets/class-wc-widget-layered-nav.php 1 location

@@ 257-263 (lines=7) @@
254
	 * @return string
255
	 */
256
	protected function get_page_base_url( $taxonomy ) {
257
		if ( defined( 'SHOP_IS_ON_FRONT' ) ) {
258
			$link = home_url();
259
		} elseif ( is_post_type_archive( 'product' ) || is_page( wc_get_page_id('shop') ) ) {
260
			$link = get_post_type_archive_link( 'product' );
261
		} else {
262
			$link = get_term_link( get_query_var('term'), get_query_var('taxonomy') );
263
		}
264
265
		// Min/Max
266
		if ( isset( $_GET['min_price'] ) ) {

includes/widgets/class-wc-widget-rating-filter.php 1 location

@@ 42-48 (lines=7) @@
39
	 * @return string
40
	 */
41
	protected function get_page_base_url() {
42
		if ( defined( 'SHOP_IS_ON_FRONT' ) ) {
43
			$link = home_url();
44
		} elseif ( is_post_type_archive( 'product' ) || is_page( wc_get_page_id('shop') ) ) {
45
			$link = get_post_type_archive_link( 'product' );
46
		} else {
47
			$link = get_term_link( get_query_var('term'), get_query_var('taxonomy') );
48
		}
49
50
		// Min/Max
51
		if ( isset( $_GET['min_price'] ) ) {