2

I'm trying to remove the review tab that appears on product pages and I have added in the two reference blocks below in catalog_product_view.xml.

<block class="Magento\Catalog\Block\Product\View" name="product.info.review" template="product/view/review.phtml"/> <referenceBlock name="product.info.review" remove="true" /> <referenceBlock name="reviews.tab" remove="true" /> 

However this has not just removed the review tab but also the Description and Additional Information Tabs. Is there a way of just removing the review tab and nothing else?

My Magento version is 2.2.4

1 Answer 1

1

app/code/Vendor/YourTheme/view/frontend/layout/catalog_product_view.xml

 <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="product.info.details"> <referenceBlock name="reviews.tab" remove="true"/> </referenceBlock> </body> </page> 
2
  • This does the same of removing all tabs rather than just the reviews tab. Is there a way to differentiate between the tabs so you only remove one? Commented Feb 25, 2019 at 16:24
  • This code removing only review tab only, not whole. This code working fine with M2.3 Commented Feb 25, 2019 at 16:27

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.