functions.php concatenate return
-
Hello,
I have a function which is working well to return a maximum length on my woocommerce products descriptions.
Here is the code:
add_filter('woocommerce_short_description', 'reigel_woocommerce_short_description', 10, 1); function reigel_woocommerce_short_description($post_excerpt){ if (!is_product()) { $post_excerpt = substr($post_excerpt, 0, 80); } return $post_excerpt; }I would like to concatenate the $post-excerpt var with a string which contains “…” to get something like that as my description:
“blabla blabla…” instead of just “blabla blabla”.
Can you help me please ?
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘functions.php concatenate return’ is closed to new replies.