Code Duplication    Length = 23-54 lines in 2 locations

templates/archive-product.php 1 location

@@ 56-109 (lines=54) @@
53
54
    </header>
55
56
		<?php if ( have_posts() ) : ?>
57
58
			<?php
59
				/**
60
				 * woocommerce_before_shop_loop hook.
61
				 *
62
				 * @hooked woocommerce_result_count - 20
63
				 * @hooked woocommerce_catalog_ordering - 30
64
				 */
65
				do_action( 'woocommerce_before_shop_loop' );
66
			?>
67
68
			<?php woocommerce_product_loop_start(); ?>
69
70
				<?php woocommerce_product_subcategories(); ?>
71
72
				<?php while ( have_posts() ) : the_post(); ?>
73
74
					<?php
75
						/**
76
						 * woocommerce_shop_loop hook.
77
						 *
78
						 * @hooked WC_Structured_Data::generate_product_data() - 10
79
						 */
80
						do_action( 'woocommerce_shop_loop' );
81
					?>
82
83
					<?php wc_get_template_part( 'content', 'product' ); ?>
84
85
				<?php endwhile; // end of the loop. ?>
86
87
			<?php woocommerce_product_loop_end(); ?>
88
89
			<?php
90
				/**
91
				 * woocommerce_after_shop_loop hook.
92
				 *
93
				 * @hooked woocommerce_pagination - 10
94
				 */
95
				do_action( 'woocommerce_after_shop_loop' );
96
			?>
97
98
		<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
99
100
			<?php
101
				/**
102
				 * woocommerce_no_products_found hook.
103
				 *
104
				 * @hooked wc_no_products_found - 10
105
				 */
106
				do_action( 'woocommerce_no_products_found' );
107
			?>
108
109
		<?php endif; ?>
110
111
	<?php
112
		/**

includes/wc-template-functions.php 1 location

@@ 418-440 (lines=23) @@
415
416
			<?php do_action( 'woocommerce_archive_description' ); ?>
417
418
			<?php if ( have_posts() ) : ?>
419
420
				<?php do_action( 'woocommerce_before_shop_loop' ); ?>
421
422
				<?php woocommerce_product_loop_start(); ?>
423
424
					<?php woocommerce_product_subcategories(); ?>
425
426
					<?php while ( have_posts() ) : the_post(); ?>
427
428
						<?php wc_get_template_part( 'content', 'product' ); ?>
429
430
					<?php endwhile; // end of the loop. ?>
431
432
				<?php woocommerce_product_loop_end(); ?>
433
434
				<?php do_action( 'woocommerce_after_shop_loop' ); ?>
435
436
			<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
437
438
				<?php do_action( 'woocommerce_no_products_found' ); ?>
439
440
			<?php endif;
441
442
		}
443
	}