Add Published Date Per Product – WooCommerce
This code enables you to add the date your product was published in any WordPress theme. The code includes :
Schema markup ACF .json file to show or hide the product date A special function for human time difference A function for the date which includes parameters for before, after, label and time format. A function to output the date on single product pages if your custom field value is set to true (1).
Example output in HTML source :
<time class="product-date" itemprop="datePublished" datetime="2022-05-28T07:06:38+00:00">May 28, 2022</time>
To do this, you need to setup a input method and use PHP code
This is the first part of the article “Add Published Date Per Product – WooCommerce“
written by WP Sites.