woocommerce_cart_item_class
Использование
add_filter( 'woocommerce_cart_item_class', 'wp_kama_woocommerce_cart_item_class_filter', 10, 3 ); /** * Function for `woocommerce_cart_item_class` filter-hook. * * @param $string * @param $cart_item * @param $cart_item_key * * @return */ function wp_kama_woocommerce_cart_item_class_filter( $string, $cart_item, $cart_item_key ){ // filter... return $string; }
- $string
- -
- $cart_item
- -
- $cart_item_key
- -
Где вызывается хук
В файле: /templates/cart/cart.php
woocommerce_cart_item_class
woocommerce/templates/cart/cart.php 56
<tr class="woocommerce-cart-form__cart-item <?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
woocommerce/templates/checkout/review-order.php 36
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">