WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Displaying Product "Short Description" (1 post)

  1. attrition79
    Member
    Posted 6 months 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.

    http://wordpress.org/plugins/woocommerce/

Reply

You must log in to post.

About this Plugin

About this Topic