Hi @regianesouza
In order to put a date and time of when a product is published, you can put this custom code on your functions.php
file in Appearance → Theme File Editor.
add_action( 'woocommerce_after_shop_loop_item_title', 'display_post_date_and_hours', 20 );
function display_post_date_and_hours() {
global $product;
// Get the product's published date
$product_date = $product->get_date_created();
// Format the product date and time
$formatted_date = $product_date->date( 'F j, Y' );
$formatted_time = $product_date->date( 'g:i a' );
// Output the formatted product date and time
echo '<p>Published on ' . $formatted_date . ' at ' . $formatted_time . '</p>';
}
Please note that we can’t provide support for code customization as per our support policy. Still, if you need customization, we do our best to offer advice and direct you to appropriate resources. Based on the feedback we get from our customers, we highly recommend contacting one of the services on our Customization page.
I hope this helps!