Displaying Product "Short Description" (1 post)

  1. attrition79
    Posted 2 years ago #

    How can I display a products "Short Description" along with the product name in the cart, checkout, and order confirmation (order details) after checking out?

    Currently I am able to display it in the cart and checkout, but it disappears after the order is processed and the "Order Details" screen appears.

    Here is the code I am using inside my theme's function.php

    add_filter( 'woocommerce_get_item_data', 'wc_checkout_description_so_15127954', 10, 2 );

    function wc_checkout_description_so_15127954( $other_data, $cart_item )
    $post_data = get_post( $cart_item['product_id'] );
    $other_data[] = array( 'name' => $post_data->post_excerpt );
    return $other_data;

    Thanks in advance for all the help.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic