woocommerce_product_loop_start()
Output the start of a product loop. By default this is a UL.
Hooks from the function
Returns
String.
Usage
woocommerce_product_loop_start( $echo );
- $echo(true|false)
- Should echo?.
Default:true
woocommerce_product_loop_start() woocommerce product loop start code WC 10.7.0
function woocommerce_product_loop_start( $echo = true ) {
ob_start();
wc_set_loop_prop( 'loop', 0 );
wc_get_template( 'loop/loop-start.php' );
$loop_start = apply_filters( 'woocommerce_product_loop_start', ob_get_clean() );
if ( $echo ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $loop_start;
} else {
return $loop_start;
}
}