Code Duplication    Length = 23-38 lines in 2 locations

templates/archive-product.php 1 location

@@ 51-88 (lines=38) @@
48
			do_action( 'woocommerce_archive_description' );
49
		?>
50
51
		<?php if ( have_posts() ) : ?>
52
53
			<?php
54
				/**
55
				 * woocommerce_before_shop_loop hook.
56
				 *
57
				 * @hooked woocommerce_result_count - 20
58
				 * @hooked woocommerce_catalog_ordering - 30
59
				 */
60
				do_action( 'woocommerce_before_shop_loop' );
61
			?>
62
63
			<?php woocommerce_product_loop_start(); ?>
64
65
				<?php woocommerce_product_subcategories(); ?>
66
67
				<?php while ( have_posts() ) : the_post(); ?>
68
69
					<?php wc_get_template_part( 'content', 'product' ); ?>
70
71
				<?php endwhile; // end of the loop. ?>
72
73
			<?php woocommerce_product_loop_end(); ?>
74
75
			<?php
76
				/**
77
				 * woocommerce_after_shop_loop hook.
78
				 *
79
				 * @hooked woocommerce_pagination - 10
80
				 */
81
				do_action( 'woocommerce_after_shop_loop' );
82
			?>
83
84
		<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
85
86
			<?php wc_get_template( 'loop/no-products-found.php' ); ?>
87
88
		<?php endif; ?>
89
90
	<?php
91
		/**

includes/wc-template-functions.php 1 location

@@ 371-393 (lines=23) @@
368
369
			<?php do_action( 'woocommerce_archive_description' ); ?>
370
371
			<?php if ( have_posts() ) : ?>
372
373
				<?php do_action('woocommerce_before_shop_loop'); ?>
374
375
				<?php woocommerce_product_loop_start(); ?>
376
377
					<?php woocommerce_product_subcategories(); ?>
378
379
					<?php while ( have_posts() ) : the_post(); ?>
380
381
						<?php wc_get_template_part( 'content', 'product' ); ?>
382
383
					<?php endwhile; // end of the loop. ?>
384
385
				<?php woocommerce_product_loop_end(); ?>
386
387
				<?php do_action('woocommerce_after_shop_loop'); ?>
388
389
			<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
390
391
				<?php wc_get_template( 'loop/no-products-found.php' ); ?>
392
393
			<?php endif;
394
395
		}
396
	}