Don’t update modified post date when user add a product review or comment?
Question
I am using WooCommerce and I added the following code on content-single-product.php
template to show last update of product:
<p class="data-label">Updated</p>
<p class="info"> <?php echo get_the_modified_time( 'F j, Y' ); ?> </p>
On single product pages I have enable reviews tab and comment tab so customer can add comment on a product.
The problem is when user add new review or comment to product, the last update date for the
product is changed to the date of its comment.
I don’t want to change the last update date of product when user add new comment on any product.
0
date, php, posts, woocommerce
8 months
0 Answers
99 views
0
Leave an answer
You must login or register to add a new answer .