How to get the WooCommerce product variation image
here is product set in display in cart in cart.php $_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 ); $thumbnail = apply_filters( ‘woocommerce_cart_item_thumbnail’, $_product->get_image(), $cart_item, $cart_item_key ); if ( ! $_product->is_visible() ) { echo $thumbnail; } else { $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($_product->id), ‘thumbnail’ ); $cartimgsrc=UNAVAILABLEIMG; if($thumb[0]){ $cartimgsrc=$thumb[0]; $product … Read more