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