A function which retrieves product published date.


  • Full name: get_product_published_date
  • Defined in: cms/core/Shared/Helpers/product.php

Parameters

Parameter Type Description
$productId string Product id.
$format string Format to use for retrieving the date the product was published.
Accepts 'G', 'U', or php date format value specified
in 'date_format' option. Default 'U'.
$gmt bool Whether to use GMT. Default false.
$translate bool Whether the returned string should be translated. Default false.

Return Value

string

Formatted product published date string or Unix timestamp if $format is 'U' or 'G'. '' on failure.