Woocommerce style product in cart

277 Views Asked by At

Does anyone know how to style individual products in the woocommerce cart? For example, I have setupcosts from where I want to remove the 'delete' button. Is there a way to give the table row an id or class with the product ID?

1

There are 1 best solutions below

0
On BEST ANSWER

You can filter the class on the table row via woocommerce_cart_item_class

function so_41124222_cart_item_class( $class, $cart_item, $cart_item_key ){
    $class .= ' -product-id-' . $cart_item['product_id'];
    return $class;
}
add_filter( 'woocommerce_cart_item_class', 'so_41124222_cart_item_class', 10, 3 );