ActionScheduler_wpCommentLogger::logpublicWC 1.0

Create log entry.

Method of the class: ActionScheduler_wpCommentLogger{}

No Hooks.

Returns

String. The log entry ID

Usage

$ActionScheduler_wpCommentLogger = new ActionScheduler_wpCommentLogger();
$ActionScheduler_wpCommentLogger->log( $action_id, $message, ?DateTime $date );
$action_id(string) (required)
Action ID.
$message(string) (required)
Action log's message.
?DateTime $date
.
Default: null

ActionScheduler_wpCommentLogger::log() code WC 10.4.3

public function log( $action_id, $message, ?DateTime $date = null ) {
	if ( empty( $date ) ) {
		$date = as_get_datetime_object();
	} else {
		$date = as_get_datetime_object( clone $date );
	}
	$comment_id = $this->create_wp_comment( $action_id, $message, $date );
	return $comment_id;
}