WordPress action hook

woocommerce_before_shop_loop_item

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

“Hook: woocommerce_before_shop_loop_item.”

How to use woocommerce_before_shop_loop_item

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_before_shop_loop_item', 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.

32 plugins that fire woocommerce_before_shop_loop_item

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_before_shop_loop_item' ) templates/content-product.php:34
  2. Essential Addons for Elementor icon Essential Addons for Elementor1+ million installs do_action( 'woocommerce_before_shop_loop_item' ) includes/Template/Eicon-Woocommerce/list-preset-1.php:105
  3. Carousel Slider icon Carousel Slider30,000+ installs do_action( 'woocommerce_before_shop_loop_item' ) templates/loop/product-carousel-2.php:18
  4. Thim Elementor Kit icon Thim Elementor Kit20,000+ installs do_action( 'woocommerce_before_shop_loop_item' ) inc/elementor/widgets/global/list-product.php:343
  5. Spexo Addons for Elementor icon Spexo Addons for Elementor6,000+ installs do_action( 'woocommerce_before_shop_loop_item' ) inc/woocommerce/classic-widget-templates/list-preset-1.php:107
  6. WPZOOM Addons for Beaver Builder icon WPZOOM Addons for Beaver Builder4,000+ installs do_action( 'woocommerce_before_shop_loop_item' ) modules/wpzabb-woocommerce/includes/frontend.php:39
  7. wpsection icon wpsection3,000+ installs do_action( 'woocommerce_before_shop_loop_item' ) theme/elementor/woocomerce/template_part/hook.php:5
  8. Britetechs Companion icon Britetechs Companion2,000+ installs do_action( 'woocommerce_before_shop_loop_item' ) inc/jewelry-store/section-all/section-shop.php:97
  9. The Pack Elementor addon icon The Pack Elementor addon2,000+ installs do_action( 'woocommerce_before_shop_loop_item' ) includes/woocommerce/content-product.php:34
  10. WPoperation Elementor Addons icon WPoperation Elementor Addons900+ installs do_action( 'woocommerce_before_shop_loop_item' ) elements/common/product-sale.php:211
  11. WP Image Markers icon WP Image Markers600+ installs do_action( 'woocommerce_before_shop_loop_item' ) templates/infowindow/content-product.php:39
  12. Shopready icon Shopready100+ installs do_action( 'woocommerce_before_shop_loop_item' ) src/extension/templates/tpl/grid/layout-classic.php:16
  13. Products Slider for WPBakery icon Products Slider for WPBakery40+ installs do_action( 'woocommerce_before_shop_loop_item' ) widgets/widget-slider.php:293
  14. Similar Products icon Similar Products30+ installs do_action( 'woocommerce_before_shop_loop_item' ) class/ced_similar-products-class.php:296
  15. Nekto Core icon Nekto Core30+ installs do_action( 'woocommerce_before_shop_loop_item' ) woocommerce/content-product.php:23
  16. Smart Cycle Discounts icon Smart Cycle Discounts20+ installs do_action( 'woocommerce_before_shop_loop_item' ) resources/views/frontend/sale-products-grid.php:60
  17. WPEnhanced Ajax Filter Blocks icon WPEnhanced Ajax Filter Blocks20+ installs do_action( 'woocommerce_before_shop_loop_item' ) lib/loop-templates/product-default.php:123
  18. PASS Addons icon PASS Addons20+ installs do_action( 'woocommerce_before_shop_loop_item' ) includes/common/render/partials/productive-render-functions-common.php:3220
  19. OS WooCommerce Shop Design icon OS WooCommerce Shop Design10+ installs do_action( 'woocommerce_before_shop_loop_item' ) woocommerce/content-product.php:37
  20. Customers Also Viewed for WooCommerce icon Customers Also Viewed for WooCommerce10+ installs do_action( 'woocommerce_before_shop_loop_item' ) templates/customers-also-viewed.php:21
  21. DynamicBlocks icon DynamicBlocks10+ installs do_action( 'woocommerce_before_shop_loop_item' ) templates/public/dynamicblock-content-product.php:34
  22. WooProduct Shortcode icon WooProduct Shortcode10+ installs do_action( 'woocommerce_before_shop_loop_item' ) wooproduct-template.php:5
  23. Awesome Carousel Slider icon Awesome Carousel Slider10+ installs do_action( 'woocommerce_before_shop_loop_item' ) templates/public/product-carousel-2.php:37
  24. WooVariations icon WooVariations10+ installs do_action( 'woocommerce_before_shop_loop_item' ) woocommerce/content-product.php:47
  25. Mysterx icon MysterxFewer than 10 installs do_action( 'woocommerce_before_shop_loop_item' ) templates/mysterx/loopmysterxopening.php:27
  26. Awesome designs for WooCommerce icon Awesome designs for WooCommerceFewer than 10 installs do_action( 'woocommerce_before_shop_loop_item' ) public/templates/2/content-product.php:36
  27. WEBD Woo Event Bookings icon WEBD Woo Event BookingsFewer than 10 installs do_action( 'woocommerce_before_shop_loop_item' ) templates/content-product.php:46
  28. Siddik DevKit for WooCommerce icon Siddik DevKit for WooCommerceFewer than 10 installs do_action( 'woocommerce_before_shop_loop_item' ) includes/widgets/wc-products/tpl/each-item.php:16
  29. Simple AJAX Product Search for WooCommerce icon Simple AJAX Product Search for WooCommerceFewer than 10 installs do_action( 'woocommerce_before_shop_loop_item' ) templates/frontend/product-grid.php:17
  30. Fast Wishlist and Bookmark icon Fast Wishlist and BookmarkFewer than 10 installs do_action( 'woocommerce_before_shop_loop_item' ) includes/class-woocommerce-wishlist.php:86
  31. Alsoviewed for woocommerce icon Alsoviewed for woocommerceFewer than 10 installs do_action( 'woocommerce_before_shop_loop_item' ) views/product/tpl.php:15
  32. Sifency Addons icon Sifency AddonsFewer than 10 installs do_action( 'woocommerce_before_shop_loop_item' ) includes/elementor/woocommerce/product-grid/products.php:114

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.