I'm trying to add my product short description into my order page as a new tab so we have an easier way to order products without having to go inside of them.
I see currently SKU displays under the product ideally it would have a Product short description instead.
This is what I've managed to get so far however no output of the short desc
// Adds tab
add_action( 'woocommerce_admin_order_item_headers', 'pd_admin_order_items_headers' );
function pd_admin_order_items_headers($order){
?>
<th class="line_customtitle sortable" data-sort="your-sort-option">
Product MPN
</th>
<?php
}
// Shows Short Desc
add_action( 'woocommerce_admin_order_item_values', 'pd_admin_order_item_values' );
function pd_admin_order_item_values( $product ) {
?>
<td class="line_customtitle">
<?php the_excerpt(); ?>
</td>
<?php
}
The results currently say
"There is no excerpt because this is a protected post."
I feel like it's not looping through the product and trying to fetch the orders excerpt hence why it says it's protected but I'm not too experienced with this.
Any help is appreciated.