woocommerce add long description to products on shop page with character limit

Solutions on MaxInterview for woocommerce add long description to products on shop page with character limit by the best coders in the world

showing results for - "woocommerce add long description to products on shop page with character limit"
Lisa
30 Nov 2020
1/**
2 * WooCommerce, Add Long Description to Products on Shop Page with Character limit
3 *
4 * @link https://wpbeaches.com/woocommerce-add-short-or-long-description-to-products-on-shop-page
5 */
6add_action( 'woocommerce_after_shop_loop_item_title', 'wc_add_long_description' , 9);
7function wc_add_long_description() {
8  global $product;
9
10  ?>
11        <div itemprop="description">
12            <?php echo substr( apply_filters( 'the_content', $product->post->post_content ), 0,77 ); echo '...' ?>
13        </div>
14  <?php
15}