Question

As the title suggests, can anyone please advise why Woocommerce is showing the word line in square brackets '[line]' after the product names?

Please see the image below:

Image of product names with text in square brackets after

I am using the latest version of WordPress (3.8.1), the Yith SoCute theme and Woocommerce with the following plugins:

  • Wow Slider
  • Woocommerce Compare
  • Woocommerce Ajax Navigation
  • Woocommerce Wish List
  • Woocommerce Magnifier

I think that there may be a simple explanation for this which I am missing; however, I can't find any answers using Google and, I have now spent far too much time looking (a full day).

So, it's time to ask for help.

Thanks everyone.

Was it helpful?

Solution

The [Line] is been added to the page by this piece of code:

add_action( 'woocommerce_single_product_summary', create_function( '', 'echo do_shortcode("[line]");' ) );

in the woocommerce/content-single-product.php file

to remove the [line] you do one of two things:

  1. Change that piece of code to

    add_action( 'woocommerce_single_product_summary', create_function( '', 'echo do_shortcode(" ");' ) );
    
  2. Remove/comment out that line, but in doing that you will need to add clear:left; to the .single-product.woocommerce div.product .description style:

    .single-product.woocommerce div.product .description
    {
        margin-top: 20px;
        margin-bottom: 20px;
        clear: left;
    }
    

    otherwise the description will come onto the same line as the product title.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top