Hello WooCommerce Customizers! Today we take a look at the WooCommerce Single Product Page and specifically at how to display the product/post published date. It might be useful to users in case you need to show how “new” a product is, or if you have specific needs. Enjoy 🙂

PHP Snippet: Show Product Published Date @ WooCommerce Single Product Page
/*
* @snippet WooCommerce: Show Product Published Date
* @how-to Get CustomizeWoo.com FREE
* @author Rodolfo Melogli
* @compatible WooCommerce 5
* @donate $9 https://businessbloomer.com/bloomer-armada/
*/
add_action(
'woocommerce_single_product_summary', 'bloomer_echo_product_date', 25 );
function bloomer_echo_product_date() {
if ( is_product() ) {
echo the_date( '', '<span class="date_published">Published on: ', '</span>', false );
}
}
// Change the date format: https://codex.wordpress.org/Function_Reference/the_date