add_filter('woocommerce_order_item_name','hospicode_add_short_desc_to_order_details',10,2);function hospicode_add_short_desc_to_order_details($item_name,$item){// Get the product object $product=$item->get_product();// Check if the product exists and has a short description if ($product && $product->get_short_description()){// Append the short description below the product name $item_name .='<div class="product-short-description" style="font-size: 0.9em; color: #666; margin-top: 5px;">' . $product->get_short_description() . '</div>'}return $item_name}// 1. For the Cart Page add_filter('woocommerce_cart_item_name','hospicode_short_desc_in_cart',10,3);function hospicode_short_desc_in_cart($name,$cart_item,$cart_item_key){$product=$cart_item['data'];$short_description=$product->get_short_description();if (! empty($short_description)){$name .='<div class="cart-short-desc" style="font-size: 0.85em; color: #777; margin-top: 5px; line-height: 1.2;">' . $short_description . '</div>'}return $name}// 2. For the Checkout Page (Order Review Table) add_filter('woocommerce_checkout_cart_item_quantity','hospicode_short_desc_at_checkout',10,3);function hospicode_short_desc_at_checkout($quantity_html,$cart_item,$cart_item_key){$product=$cart_item['data'];$short_description=$product->get_short_description();if (! empty($short_description)){$quantity_html .='<div class="checkout-short-desc" style="font-size: 0.8em; color: #777; font-weight: normal; margin-top: 5px;">' . $short_description . '</div>'}return $quantity_html}