Add Image and remove Option on Checkout billing

Past this code last of Thame Edite : Fungstion.php

 

// Add product image + remove on checkout page
add_filter( 'woocommerce_checkout_cart_item_quantity', 'add_remove_button_and_quantity_and_price_and_image_to_cart_table', 10, 3 );
function add_remove_button_and_quantity_and_price_and_image_to_cart_table( $quantity_html, $cart_item, $cart_item_key ) {
    if ( is_checkout() ) {
        $product = $cart_item['data'];
		
        $thumbnail = $product->get_image(array( 35, 35 ));
        $quantity_html = '<td class="product-thumbnail">' . $thumbnail . '</td>';
     
        $quantity_html .= '<td class="product-remove"><a href="' . esc_url( wc_get_cart_remove_url( $cart_item_key ) ) . '" class="remove" aria-label="' . esc_attr__( 'Remove this item', 'woocommerce' ) . '" style="color: red;">X</a></td>';		
    }
    return $quantity_html;
}

 

Leave a Comment

Your email address will not be published. Required fields are marked *