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.9.5.1

do_action('woocommerce_before_shop_loop') is found 4 times:

  • /includes/shortcodes/class-wc-shortcode-products.php line 651
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
         * If the pagination is not enabled, this hook will not be fired.
         *
         * @since 3.3.1
         */
        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 1009
    1005
    1006
    1007
    1008
    1009
    1010
    1011
    1012
    1013
    1014
    1015
    <?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 296
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    * @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 49
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    * @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: