0

I have this function (woocommerce) and it changes the product descriptions tab titles from the defaukt....

add_filter( 'woocommerce_product_tabs', 'wc_change_product_description_tab_title', 10, 1 );
function wc_change_product_description_tab_title( $tabs ) {
  global $post;
    if ( isset( $tabs['description']['title'] ) )
    $tabs['description']['title'] = '★ Product Information'."\n".' ★ Ingredients'."\n".' ★ Sizes';
    return $tabs;
}

The problem is, that it does not separate new titlles like this:

★ Product Information
★ Ingredients
★ Sizes

I've tried \n and \r and <br> and char(13) to get them to stack......
But Im running into a dead-end. Is there a way to do this other than ( ."\n". ) ? and even that does not work :(

2
Contributors
3
Replies
23
Views
2 Months
Discussion Span
Last Post by idaryl
0

Thanks for the input but that didn't work... it just displayed the html as a string (like) <br>

0

Well here's an update!

  • added a css white-space: pre; /* or pre-wrap */class to the tabs

and the "/n" worked....

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.