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.

10 replies
  1. Thomas
    Thomas says:

    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!

    Reply
  2. Asker
    Asker says:

    Hello i have a problem, i am using filezilla, and cant duplicate files… so basicly i cant move that file to the child theme and changfe it before… any solutions?

    Reply
  3. Federico
    Federico says:

    Hi Nicola!

    Thanks for your code to hide the review date. In your post, you mention:

    “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.”

    How would be the CSS to achieve the same objective? and what do you mean by search engines still being able to read the review date? When someone searches the product, they will find the review as a search link as any other links provided by Google?

    Thank you for your help!

    Reply
    • Nicola Mustone
      Nicola Mustone says:

      Hi Federico,
      Via CSS you would use display: none on the review date element to hide it.

      and what do you mean by search engines still being able to read the review date?

      I mean that search engine bots ignore CSS. If an element is hidden via CSS it will still be visible to bots since they read the source of the page, not what the customer sees. So the review date might be element of ranking or other things that search engines do with it.

      Reply
  4. ceco
    ceco says:

    Just did it but I doesn’t work. Any other solutions?
    How about the css code as an alternative?

    Looking forward to your reply. 🙁

    Reply

Trackbacks & Pingbacks

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

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

You have to agree to the comment policy.

This site uses Akismet to reduce spam. Learn how your comment data is processed.