skip to Main Content

what I’m trying to do here is to remove my smaller images from my mini cart and this seem I can’t really find the correct directory to modify it. These are the code that I added in my function.php and my review-order.php.
The attachment is my image of the interface

review-order.php
<?php $thumbnail= apply_filters( 'woocommerce_in_cart_product_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ); ?>

Function.php

global $product; 
if (is_cart()){ echo "<style>#checkout_thumbnail{display:none;}</style>"; } 
$item_data = $cart_item_key['data']; 
$post = get_post($item_data->id); 
$thumb = get_the_post_thumbnail($item_data->id, array( 100, 100)); 
echo '<div id="checkout_thumbnail" style="float: left; padding-right: 8px">' . $thumb . '</div> ' . $post->post_title; } add_filter('woocommerce_cart_item_name', isa_woo_cart_attributes, 10, 2);```

2

Answers


  1. Place this code filter on function.php it will remove the images from cart page:

    function sv_remove_cart_product_link( $product_link, $cart_item, $cart_item_key ) {
        $product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
        return $product->get_title();
    }
    add_filter( 'woocommerce_cart_item_name', 'sv_remove_cart_product_link', 10, 3 );
    
    Login or Signup to reply.
  2. Add this css in style css

    .woocommerce table.cart .product-thumbnail { display:none !important; } 
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search