Checkout thumbnails

0.0/5
<?php
function isa_woo_cart_attributes($cart_item, $cart_item_key) {
    global $product; 
    if (!is_checkout()){ 
        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">' . $thumb . '</div> '; 
	$product = new WC_product($item_data->id);
	echo '<div>' .$product->name . '</div>';
} 
add_filter('woocommerce_cart_item_name', 'isa_woo_cart_attributes', 10, 2);

Comments and reviews

{{ reviewsTotal }} Review
{{ reviewsTotal }} Reviews
{{ options.labels.newReviewButton }}
{{ userData.canReview.message }}

Description

This snippet was fetched automatically from WPDistro.cz projects.

Author

Tags

This snippet is untagged