woocommerce_product_loop()WC 3.4.0

Should the WooCommerce loop be displayed?

This will return true if we have posts (products) or if we have subcats to display.

No Hooks.

Return

true|false.

Usage

woocommerce_product_loop();

Changelog

Since 3.4.0 Introduced.

Code of woocommerce_product_loop() WC 6.8.2

function woocommerce_product_loop() {
	return have_posts() || 'products' !== woocommerce_get_loop_display_mode();
}