Hide product description if it contains a special phrase

Hello,

In my store I have the product description on the product page in a collapsible tab. If you click on tab, the entire description is displayed.

I would like to hide this entire tab if the product description begins or contains a special phrase (for example “Let this product”) alternatively if the product’s name begins with, for example, “Perfume”

Is it possible to do that with some customized liquid on the product page?

The reason I sometimes want to hide this tab is because the product description is automatically imported from the supplier, and the description is lousy and not at all selling. Then I’d rather hide it until I’ve had time to manually rewrite the description.

url: doftnoter.se

passw: test12345

Thanks!

Hi, @entranced .

Follow These steps,

Go to the online store theme and go to base.css file paste the code mentiond below.

.product__info-container summary {
    display: none;
}

.accordion {
    border-bottom: 0px;
}

Result:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Thanks for your reply, Websensepro.

That hides the description on all my products.

Im looking for a conditional code that only hides the tab if the product description begins or contains a special phrase (for example “Let this product”) alternatively if the product’s name begins with “Perfume”. Any of these two condition would work.

I guess Im looking for a condition something like:

if product__info-container summary = 'Let this product'
	display: none;

But Im no coder… :slightly_smiling_face: