减少woocommerce摘录长度?

So, i am currently working with the theme Neighborhood and it seems like when i choose to show description under the products it shows the whole thing.

Is there any way to limit the Excerpt length for that? I've tried some different codes that i've put into funtions.php and also tried to edit the short-description.php in the woocommerce folder to no avail.

i've tried this code

<?php $excerpt = apply_filters( 'woocommerce_short_description', $post->post_excerpt );
echo substr($length,0, 10);
?>

Is it something that i am missing here i wonder?

Looks like you need a custom function

function get_the_twitter_excerpt(){
$excerpt = get_the_content();
$excerpt = strip_shortcodes($excerpt);
$excerpt = strip_tags($excerpt);
$the_str = substr($excerpt, 0, 20);
return $the_str;
}

you should be able to put the above into your functions and this

<?php echo 'Excerpt: '.get_the_twitter_excerpt(); ?>

into your loop.