Posted on

Removing the Review Date

WooCommerce includes a built-in reviews system to allow customers to leave a review for the products they purchased.

It shows their comment, a rating from 1 to 5, the customer name and avatar, the review date and (if enabled) a label that indicates if the customer is a verified owner of that product.

Let’s talk more about the date. Imagine that you just moved from another platform to WooCommerce. All your reviews will probably show the current date instead of their original date. That would be annoying, so a solution would be to simply hide the review date.

How would you do that?

Override the Reviews Template

The only solution at the moment is to override the templates.

The date is hard-coded in a template and there are not hooks to remove it. You could still hide it via CSS, but then search engines can still read it on your page, so let’s remove it completely.

The template that shows the review date is wp-content/plugins/woocommerce/templates/single-product/review-meta.php. Copy this file and paste it in wp-content/themes/your-child-theme-name/woocommerce/single-product/.

If the path woocommerce/single-product/ does not exist in your theme, create it.

Now open the file that you just pasted and remove this part of the code, on line 39:

<span class="woocommerce-review__dash">โ€“</span> <time class="woocommerce-review__published-date" itemprop="datePublished" datetime="<?php echo get_comment_date( 'c' ); ?>"><?php echo get_comment_date( wc_date_format() ); ?></time>

The review date will not show from now on.

3 thoughts on “Removing the Review Date

  1. […] Mustone has a quick guide to removing the review date from WooCommerce product reviews (helpful if you’ve imported […]

  2. Thank you so much!! That worked like a charm ๐Ÿ™‚ I have been pulling my hair out trying to figure out where to find that code!

    1. You’re welcome Thomas ๐Ÿ™‚

Leave a Reply

Your email address will not be published. Required fields are marked *