Skip to content
Advertisement

Add a line break in Woocommerce Product Attributes

I have a Purfume product with these attributes:

JavaScript

And in the product page, inside the additional informations tab, they are displayed on the same line, separated by a comma.

JavaScript

I know it’s possible to do a character replacement so that a “,” in the backend becomes a line break <br/>. But I don’t know how.

I want it to look like this

JavaScript

Advertisement

Answer

You can use the woocommerce_attribute filter to change the commas into line breaks.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement