I was thinking that for my purposes it might even be better to show a specific attribute in my order details rather than item description.
Please let me know if this is possible.
Thank you!
Rynald0s
(@rynald0s)
Automattic Happiness Engineer
Hi @denniscabrera!
The following code works:
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>';
}
You can add this code to your site using the Code snippets plugin.
Here’s some information on how to add code to your site the correct way:
http://rynaldo.com/how-to-add-custom-code-to-your-woocommerce-wordpress-site-the-right-way/
Cheers!
I’m resolving this topic as it has gone silent – please open up a new topic if you need more help with anything!