WordPress at Your Fingertips
function is not described

CronExpression::getExpression() public WC 1.0

Get all or part of the CRON expression

{} It's a method of the class: CronExpression{}

No Hooks.


String|null. Returns the CRON expression, a part of the

CRON expression, or NULL if the part was specified but not found


$CronExpression = new CronExpression();
$CronExpression->getExpression( $part );
(optional) Specify the part to retrieve or NULL to
php get the full cron schedule string.
Default: null

Code of CronExpression::getExpression() WC 6.1.0

public function getExpression($part = null)
    if (null === $part) {
        return implode(' ', $this->cronParts);
    } elseif (array_key_exists($part, $this->cronParts)) {
        return $this->cronParts[$part];

    return null;