WordPress at a glance
filter is not described

woocommerce_product_class filter-hook . WC 3.0.0

Gets a product classname and allows filtering. Returns WC_Product_Simple if the class does not exist.

Usage

add_filter( 'woocommerce_product_class', 'filter_function_name_5588', 10, 4 );
function filter_function_name_5588( $product_id, $product_type, $product_variation, $product_id ){
	// filter...

	return $product_id;
}
$product_id(int)
Product ID.
$product_type(string)
Product type.
$product_variation
-
$product_id
-

Changelog

Since 3.0.0 Introduced.

Where the hook is called

WC_Product_Factory::get_product_classname()
woocommerce_product_class
woocommerce/includes/class-wc-product-factory.php 61
$classname = apply_filters( 'woocommerce_product_class', self::get_classname_from_product_type( $product_type ), $product_type, 'variation' === $product_type ? 'product_variation' : 'product', $product_id );

Where the hook is used (in WC core)

Usage not found!