woocommerce_before_shop_loop action-hookWC 3.3.1

Fire the standard shop hooks when paginating so we can display result counts etc. If the pagination is not enabled, this hook will not be fired.

Usage

add_action( 'woocommerce_before_shop_loop', 'wp_kama_woocommerce_before_shop_loop_action' );

/**
 * Function for `woocommerce_before_shop_loop` action-hook.
 * 
 * @return void
 */
function wp_kama_woocommerce_before_shop_loop_action(){

	// action...
}

Changelog

Since 3.3.1 Introduced.

Where the hook is called

WC_Shortcode_Products::product_loop()
woocommerce_before_shop_loop
ClassicTemplate::render_archive_product()
woocommerce_before_shop_loop
woocommerce_content()
woocommerce_before_shop_loop
woocommerce/src/Blocks/BlockTypes/ClassicTemplate.php 353
do_action( 'woocommerce_before_shop_loop' );
woocommerce/templates/archive-product.php 49
do_action( 'woocommerce_before_shop_loop' );
woocommerce/includes/wc-template-functions.php 1045
<?php do_action( 'woocommerce_before_shop_loop' ); ?>

Where the hook is used in WooCommerce

woocommerce/includes/wc-template-functions.php 221
add_action( 'woocommerce_before_shop_loop', 'wc_setup_loop' );
woocommerce/includes/wc-template-hooks.php 321
add_action( 'woocommerce_before_shop_loop', 'woocommerce_output_all_notices', 10 );
woocommerce/includes/wc-template-hooks.php 83
add_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
woocommerce/includes/wc-template-hooks.php 84
add_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );