wc_product_cat_class()WC 2.4.0

Display the classes for the product cat div.

No Hooks.

Return

null. Nothing (null).

Usage

wc_product_cat_class( $class, $category );
$class(string|array)
One or more classes to add to the class list.
Default: ''
$category(object)
object Optional.
Default: null

Changelog

Since 2.4.0 Introduced.

wc_product_cat_class() code WC 8.7.0

function wc_product_cat_class( $class = '', $category = null ) {
	// Separates classes with a single space, collates classes for post DIV.
	echo 'class="' . esc_attr( join( ' ', wc_get_product_cat_class( $class, $category ) ) ) . '"';
}