woocommerce_cart_item_product

woocommerce_cart_item_product

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_cart_item_product') is found 3 times:

  • /templates/cart/cart.php line 41
    			<?php do_action( 'woocommerce_before_cart_contents' ); ?>
    
    			<?php
    			foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
    				$_product   = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
    				$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
    				/**
    				 * Filter the product name.
    				 *
    				 * @since 2.1.0
    				 * @param string $product_name Name of the product in the cart.
    
  • /templates/cart/mini-cart.php line 31
    		<?php
    		do_action( 'woocommerce_before_mini_cart_contents' );
    
    		foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
    			$_product   = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
    			$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
    
    			if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
    				/**
    				 * This filter is documented in woocommerce/templates/cart/cart.php.
    				 *
    
  • /templates/checkout/review-order.php line 32
    		<?php
    		do_action( 'woocommerce_review_order_before_cart_contents' );
    
    		foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
    			$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
    
    			if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
    				?>
    				<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
    					<td class="product-name">
    						<?php echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) ) . '&nbsp;'; ?>