Skip Navigation

Paragraphs and line-breaks missing from product description when using Product Tabs block

Open

Topic Tags: Toolset Blocks

Symptoms

The Toolset Product Tabs block includes the product description in the first tab (which comes from the content of the product post).

The text is rendered in a single paragraph without preserving line breaks.

Workaround

You can add the following code snippet to target the output of the block and ensure line-breaks are preserved using paragraph tags.

/**
 * Intervene in output of Toolset WC product tabs block to apply auto-p
 */
add_filter( 'render_block_woocommerce-views/product-tabs', function($block_content){

    return do_shortcode($block_content);
});

Leave
a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>