WordPress at Your Fingertips
function is not described

wc_product_class() WC 3.4.0

Display the classes for the product div.

No Hooks.

Return

null. Nothing.

Usage

wc_product_class( $class, $product_id );
$class(string|array)
One or more classes to add to the class list.
Default: ''
$product_id(int|WP_Post|WC_Product)
Product ID or product object.
Default: null

Changelog

Since 3.4.0 Introduced.

Code of wc_product_class() WC 5.6.0

function wc_product_class( $class = '', $product_id = null ) {
	echo 'class="' . esc_attr( implode( ' ', wc_get_product_class( $class, $product_id ) ) ) . '"';
}