ActionScheduler_wpCommentLogger::log()publicWC 1.0

Method of the class: ActionScheduler_wpCommentLogger{}

No Hooks.

Return

String. The log entry ID

Usage

$ActionScheduler_wpCommentLogger = new ActionScheduler_wpCommentLogger();
$ActionScheduler_wpCommentLogger->log( $action_id, $message, $date );
$action_id(string) (required)
-
$message(string) (required)
-
$date(DateTime)
-
Default: NULL

ActionScheduler_wpCommentLogger::log() code WC 8.7.0

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;
}