'Product Variation is not showing on the cart page

After updating woocommerce 2.6.4 into woocommerce 3.0.+ some of the product variation is not showing on the cart page.But some product variation is showing in cart page.My wordpress version is 4.7.5 and woocommerce version is 3.0.7.How to solve this problem.Any ideas? Please help me.

Thanks



Solution 1:[1]

Problem solved, add this to child theme function.php file:

add_filter( 'woocommerce_product_variation_title_include_attributes', '__return_false' );

Solution 2:[2]

Override the cart.php in your child theme.. Issue must be the old cart.php template on your child theme.

replace this

if (!$_product->is_visible()) {
echo apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . ' ';
} else {
echo apply_filters( 'woocommerce_cart_item_name', sprintf( '%s', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key );
}

// Meta data
echo WC()->cart->get_item_data($cart_item);

// Backorder notification
if ($_product->backorders_require_notification() && $_product->is_on_backorder($cart_item['quantity'])) {
echo '' . esc_html__('Available on backorder', 'woocommerce') . '';
}

Solution 3:[3]

add_filter( 'woocommerce_product_variation_title_include_attributes', '__return_false' );

It works fine at here as well

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 clemens
Solution 2 Harshana Nishshanka
Solution 3 Rasel Ahmed