WordPress action hook
woocommerce_grouped_product_list_before
Defined by WooCommerce and fired by 9 plugins in total, running on 7M+ sites between them.
How to use woocommerce_grouped_product_list_before
It's an action: your callback runs at that point and receives 3 arguments. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'woocommerce_grouped_product_list_before', function( $grouped_product_columns, $quantites_required, $product ) {
// Your code runs here.
}, 10, 3 );Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
9 plugins that fire woocommerce_grouped_product_list_before
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
do_action( 'woocommerce_grouped_product_list_before', $grouped_product_columns, $quantites_required, $product )templates/single-product/add-to-cart/grouped.php:41 -
Request a Quote for WooCommerce6,000+ installs
do_action( 'woocommerce_grouped_product_list_before', $grouped_product_columns, $quantites_required, $product )woo-templates/single-product/add-to-cart/grouped.php:46 -
CoDesigner4,000+ installs
do_action( 'woocommerce_grouped_product_list_before', $grouped_product_columns, $quantites_required, $product )widgets/product-add-to-cart/templates/grouped.php:38 -
Omnipress700+ installs
do_action( 'woocommerce_grouped_product_list_before', $grouped_product_columns, $quantites_required, $product )templates/add-to-cart/group.php:46 -
ShopPress600+ installs
do_action( 'woocommerce_grouped_product_list_before', $grouped_product_columns, $quantites_required, $product )public/templates/woocommerce/single-product/add-to-cart/grouped.php:39 -
StoreBuild400+ installs
do_action( 'woocommerce_grouped_product_list_before', $storebuild_grouped_product_columns, $storebuild_quantites_required, $product )public/woocommerce/single-product/add-to-cart/grouped.php:42 -
Visual Builder200+ installs
do_action( 'woocommerce_grouped_product_list_before', $grouped_product_columns, $quantites_required, $product )inc/woocommerce/single-product/add-to-cart/grouped.php:126 -
Shopready100+ installs
do_action( 'woocommerce_grouped_product_list_before', $grouped_product_columns, $quantites_required, $product )src/extension/elewidgets/widgets/product/template-parts/add_to_cart/types/grouped.php:38 -
Add to Cart Button Labels & Links for WooCommerce10+ installs
do_action( 'woocommerce_grouped_product_list_before', $grouped_product_columns, $quantites_required, $product )includes/woocommerce/single-product/add-to-cart/grouped.php:41
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.