• Resolved talkuvit

    (@talkuvit)


    I use the following code to display the short product description in the order-details-item.php

    add_filter( 'woocommerce_order_item_name', 'add_single_excerpt_to_order_item', 10, 3 );
    function add_single_excerpt_to_order_item( $item_name, $item, $is_visible ){
        $product_id = $item->get_product_id(); // Get the product Id
        $excerpt = get_the_excerpt( $product_id ); // Get the short description
    
        return $item_name . '<br><p class="item-description">' . $excerpt ; '</p>';
    }

    Unfortunately, the short description of the product is displayed in second place.

    1. Product name with link
    2. Short product description
    3. Design / (variants of products)
    4. Article number (SKU NUMBER)

    But I need the Short product description FIRST!

    1. Short product description
    2. Product name with link
    3. Design / (variants of products)
    4. Article number (SKU NUMBER)

    How can I do this / what should the code be?

    Can someone please help me there?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Woocommerce Short-Description in Details Order before Product Title’ is closed to new replies.