I'm trying to change the Short Description excerpt length.
I found a previous post stating that I should change
<?php echo apply_filters( 'woocommerce_short_description', $post->post_excerpt ) ?>
to
<?php $excerpt = apply_filters( 'woocommerce_short_description', $post->post_excerpt );
echo substr($length,0, 10);
?>
However when doing that, my excerpts simply disappear.
I'm afraid you're editing the plugin... if that's so, you're doing it wrong..
create a function and then hook to that filter... something like this...
paste this on your functions.php file of your theme.
Instead of editing files directly within the plugin (which is a very bad idea because once update the plugin and all of your changes will be lost!)
You can use this code for limit no of words -
explode breaks the original string into an array of words, array_splice lets you get certain ranges of those words, and then implode combines the ranges back together into single strings.
use this code to change Limit on the Shop Page not Product-detailed Page.