woocommerce_before_shop_loop

woocommerce_before_shop_loop

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_before_shop_loop') is found 4 times:

  • /includes/shortcodes/class-wc-shortcode-products.php line 646
    			do_action( "woocommerce_shortcode_before_{$this->type}_loop", $this->attributes );
    
    			// Fire standard shop loop hooks when paginating results so we can show result counts and so on.
    			if ( wc_string_to_bool( $this->attributes['paginate'] ) ) {
    				do_action( 'woocommerce_before_shop_loop' );
    			}
    
    			woocommerce_product_loop_start();
    
    			if ( wc_get_loop_prop( 'total' ) ) {
    				foreach ( $products->ids as $product_id ) {
    
  • /includes/wc-template-functions.php line 999
    			<?php do_action( 'woocommerce_archive_description' ); ?>
    
    			<?php if ( woocommerce_product_loop() ) : ?>
    
    				<?php do_action( 'woocommerce_before_shop_loop' ); ?>
    
    				<?php woocommerce_product_loop_start(); ?>
    
    				<?php if ( wc_get_loop_prop( 'total' ) ) : ?>
    					<?php while ( have_posts() ) : ?>
    						<?php the_post(); ?>
    
  • /src/Blocks/BlockTypes/ClassicTemplate.php line 294
    			 * @see woocommerce_catalog_ordering() Show form to control sort order (priority 30)
    			 *
    			 * @since 6.3.0
    			 */
    			do_action( 'woocommerce_before_shop_loop' );
    
    			woocommerce_product_loop_start();
    
    			if ( wc_get_loop_prop( 'total' ) ) {
    				while ( have_posts() ) {
    					the_post();
    
  • /templates/archive-product.php line 57
    	 * @hooked woocommerce_output_all_notices - 10
    	 * @hooked woocommerce_result_count - 20
    	 * @hooked woocommerce_catalog_ordering - 30
    	 */
    	do_action( 'woocommerce_before_shop_loop' );
    
    	woocommerce_product_loop_start();
    
    	if ( wc_get_loop_prop( 'total' ) ) {
    		while ( have_posts() ) {
    			the_post();
    

See this hook used in plugins: