WordPress action hook

woocommerce_shop_loop

Defined by WooCommerce and fired by 40 plugins in total, running on 7.1M+ sites between them.

“Hook: woocommerce_shop_loop.”

How to use woocommerce_shop_loop

It's an action: your callback runs at that point. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'woocommerce_shop_loop', function() {
	// Your code runs here.
}, 10, 1 );

Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

40 plugins that fire woocommerce_shop_loop

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs do_action( 'woocommerce_shop_loop' ) src/Blocks/BlockTypes/ClassicTemplate.php:366
  2. ShopEngine icon ShopEngine90,000+ installs do_action( 'woocommerce_shop_loop' ) widgets/archive-products/screens/default.php:425
  3. Genesis Connect for WooCommerce icon Genesis Connect for WooCommerce10,000+ installs do_action( 'woocommerce_shop_loop' ) lib/template-loader.php:281
  4. ShopBuilder icon ShopBuilder10,000+ installs do_action( 'woocommerce_shop_loop' ) templates/elementor/archive/archive-product.php:49
  5. Spexo Addons for Elementor icon Spexo Addons for Elementor6,000+ installs do_action( 'woocommerce_shop_loop' ) inc/widgets/woo-product-grid-classic.php:4721
  6. Themify Builder icon Themify Builder6,000+ installs do_action( 'woocommerce_shop_loop' ) themify/themify-template-tags.php:1483
  7. ShopEngine Gutenberg WooCommerce Builder Blocks Addon icon ShopEngine Gutenberg WooCommerce Builder Blocks Addon3,000+ installs do_action( 'woocommerce_shop_loop' ) blocks/archive-products/screen.php:203
  8. WC Vendors icon WC Vendors3,000+ installs do_action( 'woocommerce_shop_loop' ) templates/front/vendor-shop.php:65
  9. The Pack Elementor addon icon The Pack Elementor addon2,000+ installs do_action( 'woocommerce_shop_loop' ) includes/widgets/woocommerce/woo-archive-product/view.php:15
  10. MultiVendorX icon MultiVendorX2,000+ installs do_action( 'woocommerce_shop_loop' ) classes/RestAPI/Rest.php:1259
  11. Smart Related Products icon Smart Related Products900+ installs do_action( 'woocommerce_shop_loop' ) include/elementor.php:218
  12. ShopPress icon ShopPress600+ installs do_action( 'woocommerce_shop_loop' ) Templates/ProductShop.php:183
  13. StylePress for Elementor icon StylePress for Elementor600+ installs do_action( 'woocommerce_shop_loop' ) extensions/woocommerce/templates/archive-product.php:80
  14. StoreBuild icon StoreBuild400+ installs do_action( 'woocommerce_shop_loop' ) public/woocommerce/archive-product.php:60
  15. Noah Shop Builder for WooCommerce icon Noah Shop Builder for WooCommerce400+ installs do_action( 'woocommerce_shop_loop' ) includes/Blocks/ArchiveProducts.php:196
  16. Shopready icon Shopready100+ installs do_action( 'woocommerce_shop_loop' ) src/extension/templates/tpl/archive-product.php:66
  17. PWF icon PWF80+ installs do_action( 'woocommerce_shop_loop' ) includes/classes/woocommerce/class-pwf-filter-products.php:274
  18. Super Product Filter for WooCommerce icon Super Product Filter for WooCommerce80+ installs do_action( 'woocommerce_shop_loop' ) public/inc/filter/render/ajax-product-list.php:12
  19. Kemet Addons icon Kemet Addons30+ installs do_action( 'woocommerce_shop_loop' ) addons/woocommerce/classes/class-kemet-addon-woocommerce-partials.php:205
  20. Educat Elementor LMS Addon icon Educat Elementor LMS Addon20+ installs do_action( 'woocommerce_shop_loop' ) includes/widgets/woocommerce/woo-archive-product/view.php:14
  21. WPEnhanced Ajax Filter Blocks icon WPEnhanced Ajax Filter Blocks20+ installs do_action( 'woocommerce_shop_loop' ) lib/loop-templates/product-default.php:111
  22. TABLEiT icon TABLEiT20+ installs do_action( 'woocommerce_shop_loop' ) functions.php:2179
  23. Luma Product Fields icon Luma Product Fields10+ installs do_action( 'woocommerce_shop_loop' ) templates/taxonomy-product-archive.php:163
  24. Yay Wholesale B2B for WooCommerce icon Yay Wholesale B2B for WooCommerce10+ installs do_action( 'woocommerce_shop_loop' ) includes/Engine/Compatibles/Barn2WoocommerceProductTable/templates/product-table-shop.php:69
  25. Custom Builder for Elementor and WooCommerce icon Custom Builder for Elementor and WooCommerce10+ installs do_action( 'woocommerce_shop_loop' ) includes/widgets/shop/custom-woo-builder-products-loop.php:63
  26. Onex Custom Woo Builder icon Onex Custom Woo Builder10+ installs do_action( 'woocommerce_shop_loop' ) includes/widgets/shop/custom-woo-builder-products-loop.php:63
  27. Proshots For WooCommerce icon Proshots For WooCommerce10+ installs do_action( 'woocommerce_shop_loop' ) templates/archive-product.php:87
  28. Themofy Addons for Elementor icon Themofy Addons for Elementor10+ installs do_action( 'woocommerce_shop_loop' ) modules/woocommerce/includes/widgets/class-product-grid.php:886
  29. Filterive for WooCommerce icon Filterive for WooCommerce10+ installs do_action( 'woocommerce_shop_loop' ) includes/class-wcaf-ajax.php:140
  30. SpeedSearch icon SpeedSearchFewer than 10 installs do_action( 'woocommerce_shop_loop' ) src/integrations/themes/flatsome/products/products.php:136
  31. Yay Bulk Order for WooCommerce icon Yay Bulk Order for WooCommerceFewer than 10 installs do_action( 'woocommerce_shop_loop' ) includes/Engines/Compatibles/YayWholesale/templates/product-table-shop.php:69
  32. SiteEase Smart AJAX Product Filter icon SiteEase Smart AJAX Product FilterFewer than 10 installs do_action( 'woocommerce_shop_loop' ) includes/ifqpf-class-model.php:77
  33. Bazario icon BazarioFewer than 10 installs do_action( 'woocommerce_shop_loop' ) elements/widgets/archive-products/archive-products.php:2743
  34. RND Product Filters with ajax for WooCommerce icon RND Product Filters with ajax for WooCommerceFewer than 10 installs do_action( 'woocommerce_shop_loop' ) ajax/rndapf.php:1074
  35. Single Page Shopping icon Single Page ShoppingFewer than 10 installs do_action( 'woocommerce_shop_loop' ) includes/class-awcs-products-query.php:406
  36. MOC icon MOCFewer than 10 installs do_action( 'woocommerce_shop_loop' ) core/inc/segments-product.php:82
  37. FilterSmith icon FilterSmithFewer than 10 installs do_action( 'woocommerce_shop_loop' ) templates/ajax-results.php:27
  38. Polanger Dating for WordPress icon Polanger Dating for WordPressFewer than 10 installs do_action( 'woocommerce_shop_loop' ) templates/integrations/woocommerce/archive-product.php:96
  39. Flx Modernize icon Flx ModernizeFewer than 10 installs do_action( 'woocommerce_shop_loop' ) includes/WooCommerce/CatalogPayloadBuilder.php:167
  40. Marfilo icon MarfiloFewer than 10 installs do_action( 'woocommerce_shop_loop' ) includes/class-shop.php:1273

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.