• Resolved Group Of Oceninfo

    (@princebhalani143)


    Hello,

    After updating 4.5.3 WooCommerce plugin my reviews are not showing as before.

    Before it was like below:

    Truly it was white-glove service at its best. It has all the modern amenities, including the all-important wifi throughout the house.

    If your experiences are anything like mine, you will be thrilled by the villa, the staff (the cook is amazing!), the view, and the full, luxurious experience.

    The view is incredible. Simply breathtaking. Every room looks out on the unobstructed view.

    Now It’s something like

    Truly it was white-glove service at its best. It has all the modern amenities, including the all-important wifi throughout the house. If your experiences are anything like mine, you will be thrilled by the villa, the staff (the cook is amazing!), the view, and the full, luxurious experience. The view is incredible. Simply breathtaking. Every room looks out on the unobstructed view.

    Without any space or anything coming as paragraph, Can you please help me out to short this up?

    As of now code is like this:

    <div itemprop="description" class="description">
    
    Truly it was white-glove service at its best. It has all the modern amenities, including the all-important wifi throughout the house.
    
    If your experiences are anything like mine, you will be thrilled by the villa, the staff (the cook is amazing!), the view, and the full, luxurious experience.
    
    The view is incredible. Simply breathtaking. Every room looks out on the unobstructed view.</div>

    https://wordpress.org/plugins/woocommerce/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there,

    It sounds like this might be ore of a theme issue – do you still see the same spacing when using a default theme like Twenty Fifteen or Twenty Sixteen?

    Thread Starter Group Of Oceninfo

    (@princebhalani143)

    @mikeyarce

    Thank you for the reply.

    Yes, It can be theme issue. I didn’t check like that because I have made so many customization into my code. If I am activating different theme have to do all settings again.

    is there any other solution to solve this? want to add automatic <p> tag for each paragraph in review section.

    Jesse Pearson (a11n)

    (@jessepearson)

    Automattic Happiness Engineer

    The function that displays that text is pluggable, meaning it can be overridden. This is the function:

    if ( ! function_exists( 'woocommerce_review_display_comment_text' ) ) {
    	/**
    	 * Display the review content
    	 *
    	 * @return void
    	 */
    	function woocommerce_review_display_comment_text() {
    		echo '<div itemprop="description" class="description">' . get_comment_text() . '</div>';
    	}
    }

    If you were to place this function in your functions.php file, it should do what you want.

    /**
    	 * Display the review content
    	 *
    	 * @return void
    	 */
    	function woocommerce_review_display_comment_text() {
    		echo '<div itemprop="description" class="description">' . apply_filters( 'the_content', get_comment_text() ) . '</div>';
    	}

    The only difference is that the second one will apply the_content filters to the text, which should turn new lines into paragraphs or append them with br tags.

    Thread Starter Group Of Oceninfo

    (@princebhalani143)

    After new woocommerce update it fixed automatically 🙂 Thank you all

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Review Description Without Space’ is closed to new replies.